![]() |
|
[.NET] Builder /Stub - Fully Cryptable | NO EOF - 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] Builder /Stub - Fully Cryptable | NO EOF (/showthread.php?tid=4546155) |
Builder /Stub - Fully Cryptable | NO EOF - Proton! - Nov 20, 2014 Hey ya'll, I remember back before I was in the struggle to find out the best way to make a builder for my RAT; How would I go on about writing settings to the stub. Well, today I'll be showing you how to do this, and it's actually rather simple :) The best though; It does not involve EOF, so It's pretty much fully cryptable! First let me explain you what we are going to be using to write to the stub; The UpdateResource API in the kernel32.dll First download this class. (This is the class containing the functions to read/write resources. So to explain the functions: The function 'WriteResource' is a function that I made that you can simply call to write resources to the specified file with the specified resourcename. The resource written has to be byte array; whether that is a string encoded as byte array or some serialized data, thaty It does the following: Retrieves a handle for updating resources by calling the native function "BeginUpdateResource" Gets a pointer for the resource value that is going to be written to the resource. Calls the UpdateResource function to write the new resource to the file. The function 'ReadResource' is a function that I made that you can simply call to read the resources from the specified file using the specified resourcename. The filename can be specified as Nothing, that will make it read the resources from itself (what the stub does). It does the following: Retrieves a handle for the found resource. Retrieves a handle for the resource when it's loaded. Gets the size of the resource so it can allocate the proper sized byte array for the data. * Copies the data from the resource into the byte array and retrieves it. Here is a simple builder: In my builder I have two textboxes The settings I use for demonstration is called 'Host' and 'Port'. Some typical scenario for this would be in a RAT stub or something along those lines. This is the code for the Button called "Build": Code Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.ClickPretty clean.. Now the stub code: Code Module MainIf you want to download my solution, you may do so here. I hope you guys enjoyed this tutorial, and hopefully I explained it decently enough :) And if you have any feedback, please leave; criticism or positive :) ~ Regards Proton! * - nathan72389 - Nov 20, 2014 after EOF this is the next insecure way of storing stuff. it actually makes it easier for me to remove any info that your storing. think reshacker... you dont need a whole class for what 3,4 api calls. this is old school also. vb6(and lower) had been using this for a loooooong time. most other builder/stub applications regardless of the language still use this method. heck, i still use it in delphi. its nice to see something posted over again with 1/2 an explanation. * - Proton! - Nov 20, 2014 (Nov 20, 2014 05:48 AM)nathan72389 Wrote: after EOF this is the next insecure way of storing stuff. Best is removed; I haven't seen any proper explanation tutorial on HF regarding this method. To me this is better than codedom if you have a preobfuscated stub. * - IAmNotHere - Nov 20, 2014 Thanks, but uhum. How do you make the main.vb? I keep getting an empty Form1 every time I try to run my messagebox with the values? * - Proton! - Nov 20, 2014 (Nov 20, 2014 05:57 AM)IAmNotHere Wrote: Thanks, but uhum. I simply made a windows forms project, and then I deleted Form1, and made a new module called Main. * - IAmNotHere - Nov 20, 2014 Going to try again, had this question while building a rat also and builded one with a form1 as stub then. * - Proton! - Nov 20, 2014 (Nov 20, 2014 06:09 AM)IAmNotHere Wrote: Going to try again, had this question while building a rat also and builded one with a form1 as stub then. Better not to have a Form:) I see some RAT sources using Forms that are simply hidden. * - IAmNotHere - Nov 20, 2014 I deleted my form1 and added a module which I named Main.vb, but now: Code Error 10 'Main' is a type in 'Stub' and cannot be used as an expression. Application.Designer.vb 35 27 Stub* - Proton! - Nov 20, 2014 (Nov 20, 2014 06:16 AM)IAmNotHere Wrote: I deleted my form1 and added a module which I named Main.vb, but now: Hmm, did you go into "My Project" and disabled Application framework and set the startup object to sub main or Main? * - IAmNotHere - Nov 20, 2014 Proton! Dude, you made my day! The messagebox popped up as expected with the info I entered in the textboxes. This is actually pretty cool. I have more projects where external stubs are involved and, if I want to change something I have to continuously open my visual studio for editing. I am going to see, if I can make an auto stub editor for my projects. Positive + to Proton! Have a good day. * - Proton! - Nov 20, 2014 (Nov 20, 2014 06:28 AM)IAmNotHere Wrote: Proton! Dude, you made my day! Sounds cool man :) - I hope u got it all working out for you now :)! * - SIM-1676753 - Nov 20, 2014 (Nov 20, 2014 07:29 PM)Odinz Wrote: You didn't code this class. I can still see that it's been modified. If it was copied, then OP should have given proper credits to the original coder along with his name in the class or something if he decided to do so. * - Proton! - Nov 21, 2014 (Nov 20, 2014 07:29 PM)Odinz Wrote: You didn't code this class. I didn't CP this, I have actually made it from scratch, which isnt that hard tbh.. as the UpdateResource API is quite easy to understand. |