Originally posted here by daemonarch
Here is a program in visual basic with the source.Can anyone make a program that will recover any password from any file protected with that program???????????if someone do it please upload source with some explanation...
why you request for another person, do performance? o encoding this source?
you see:
Private Sub ButtonExecute_Click()
Dim FileNum As Long, Details As ProtectionDetails_Type, Pass() As Byte
Dim Temp As String, Pos As Long, SaveAs As String, ExitRoutine As Boolean
Dim ExpirationDate As Date, ED As Byte, EM As Byte, EY As Integer
Dim FSO As Object
If TextFileName.Text = "" Then
LabelStatus.Caption = "Please select a file"
Exit Sub
End If
If TextTitle.Text = "" Then
LabelStatus.Caption = "Please enter a title"
Exit Sub
End If
If TextPassword.Text = "" Then
LabelStatus.Caption = "Please enter a password"
Exit Sub
End If
If CheckExpires.Value = 1 Then
On Error GoTo DateError::
ExpirationDate = CDate(TextExpires.Text)
On Error GoTo 0
ED = Day(ExpirationDate)
EM = Month(ExpirationDate)
EY = Year(ExpirationDate)
CopyMemory ByVal VarPtr(Details.ExpirationDate), ByVal VarPtr(ED), 1
CopyMemory ByVal VarPtr(Details.ExpirationDate) + 1, ByVal VarPtr(EM), 1
CopyMemory ByVal VarPtr(Details.ExpirationDate) + 2, ByVal VarPtr(EY), 2
End If
i don't understand really where is the "cracking" section
Function GeneratePasswordData(Password As String, Data() As Byte)
Data = StrConv(Password, vbFromUnicode)
End Function
last code and
Function DecryptDataFile(Data() As Byte, Password As String)
Dim Pass() As Byte
GeneratePasswordData Password, Pass
Shield.Encoder.DecodeData Data, Pass, True
End Function
No represent any complex encoder or decoder functions, you see
if i decide generate a cracker the first step is take a patrol cipher machine like this:
think in patrol we need a scheme for take the key points:
DWORD hash_ckeeper[_LOCKS_DISCARD][2] = {
0x1D6, 0x1e11,
0xFBD, 0x1e66,
0xFC3, 0x200b,
0xFCE, 0x1e79,
0xFD4, 0x2303,
0xFDA, 0x200a,
0xFE5, 0x2313,
0xFEB, 0x22d0,
0xFF1, 0x2000,
0xFFC, 0x22d1
};
second
a struct we needet for "move" and "make" points for offset
typedef struct {
int length;
bool encrypted;
DWORD offset;
bool code;
} _section; // a portion for flags
memory offsets: (for cracking victim stream [memory or phisical data])
[t853ut8h4iy73gt2]
:
:
[ouuyr84dlksjkjfdkd]
:
:
[sdfsdvfsdvdfbrfu48]
:
:
[3u8949yrytfwrjfoih]
:
:
[h8u8rnlweufh7reih]
:
:
[dlhfweyr47yrhiwujk]
third
decrypter for the low 3 bits stripped off
for (i=0; i<dwNumOfRealSections; i++)
{
if (section[i].encrypted)
{
for (int j=0; j<section[i].length-(section[i].length%0x8); j++)
{
*(BYTE*)((DWORD)pMappedFile+section[i].offset+j) ^= key[j%0x1000];
}
}
}
your code:
Function DecryptDataFile(Data() As Byte, Password As String)
Dim Pass() As Byte
GeneratePasswordData Password, Pass
Shield.Encoder.DecodeData Data, Pass, True
End Function
don't work and is too easy for cracking the lost key onto destination file
i recommend the last point for consideration if you decide make a cracker password, that point are fundamental and it's for begginning, most complex and serious codes include an memory inspector, check points for lost encrypted key on source and double crossing scanners.
Last consideration:
Function GetUniqueID(Data() As Byte) As String
Dim DataSize As Long, Mean As Single, SD As Single
Dim Totals1() As Long, Totals2() As Long, ByteOrder1 As Single, ByteOrder2 As Single
Dim TempMean As Single
Dim ByteFrequency(255) As Long, TotalByteValue As Long
Dim Pos As Long, Total As Long, Pos2 As Long
Dim UniqueIDData() As Byte
Dim OriginalSize As Long
OriginalSize = UBound(Data)
DataSize = OriginalSize + 1
For Pos = 0 To DataSize - 1
ByteFrequency(Data(Pos)) = ByteFrequency(Data(Pos)) + 1
TotalByteValue = TotalByteValue + Data(Pos)
TotalByteValue = TotalByteValue Mod 256 ^ 3
ByteFrequency(Data(Pos)) = ByteFrequency(Data(Pos)) Mod 256
Next
Mean = TotalByteValue / DataSize
For Pos = 0 To 255
Total = Total + ByteFrequency(Pos) * (Pos - Mean) ^ 2
.
.
.
.
what is the central ID?
i recommend too too too you read more for key generators ,cracking and anticracking (for scanners and brute force..) papers.
on this sites you find so much information about that and other stuffs:
tutos of http://www.antionline.com
tutos of http://www.phrack.org (the best)
and read more about C/C++ languaje VB is limmited.
Good Post
Saludos




Reply With Quote