-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
Hello visitor, could you help me please !
When i am trying to build the reverse shell for android/arm64(alias arm64-v8a), everything works fine
RS_PUB="$(cat /path/to/my/key.pub)" RS_PASS="anybody-who-look-at-this-is-malicious" GOOS="android" GOARCH="arm64" make compressed
rm -f bin/*reverse-ssh*
CGO_ENABLED=0 go build -ldflags=" -X 'main.authorizedKey=ssh-ed25519 lllllllllllloooooooonnnnnnnnggggg-ppppppppuuuuuuubbbbbbbbkkkkkkkkeeeeeeeyyyyyyyy [email protected]' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/ .
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags=" -X 'ssh-ed25519 lllllllllllloooooooonnnnnnnnggggg-ppppppppuuuuuuubbbbbbbbkkkkkkkkeeeeeeeyyyyyyyy [email protected]' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/reverse-sshx64 .
CGO_ENABLED=0 GOARCH=386 GOOS=linux go build -ldflags=" -X 'main.authorizedKey=ssh-ed25519 lllllllllllloooooooonnnnnnnnggggg-ppppppppuuuuuuubbbbbbbbkkkkkkkkeeeeeeeyyyyyyyy [email protected]' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/reverse-sshx86 .
CGO_ENABLED=0 GOARCH=amd64 GOOS=windows go build -ldflags=" -X 'main.authorizedKey=ssh-ed25519 lllllllllllloooooooonnnnnnnnggggg-ppppppppuuuuuuubbbbbbbbkkkkkkkkeeeeeeeyyyyyyyy [email protected]' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/reverse-sshx64.exe .
CGO_ENABLED=0 GOARCH=386 GOOS=windows go build -ldflags=" -X 'main.authorizedKey=ssh-ed25519 lllllllllllloooooooonnnnnnnnggggg-ppppppppuuuuuuubbbbbbbbkkkkkkkkeeeeeeeyyyyyyyy [email protected]' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/reverse-sshx86.exe .
But for others archs i get that:
RS_PUB="$(cat /path/to/my/key.pub)" RS_PASS="anybody-who-look-at-this-is-malicious" GOOS="android" GOARM=7 GOARCH="arm" make compressed
rm -f bin/*reverse-ssh*
CGO_ENABLED=0 go build -ldflags=" -X 'main.authorizedKey=ssh-ed25519 lllllllllllloooooooonnnnnnnnggggg-ppppppppuuuuuuubbbbbbbbkkkkkkkkeeeeeeeyyyyyyyy [email protected]' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/ .
android/arm requires external (cgo) linking, but cgo is not enabled
make: *** [build] Error 1
After changing this in the Makefile i got this:
RS_PUB="$(cat /path/to/my/key.pub)" RS_PASS="anybody-who-look-at-this-is-malicious" GOOS="android" GOARM=7 GOARCH="arm" make compressed
rm -f bin/*reverse-ssh*
CGO_ENABLED=1 go build -ldflags=" -X 'main.authorizedKey=ssh-ed25519 lllllllllllloooooooonnnnnnnnggggg-ppppppppuuuuuuubbbbbbbbkkkkkkkkeeeeeeeyyyyyyyy [email protected]' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/ .
# runtime/cgo
clang: error: argument unused during compilation: '-marm' [-Werror,-Wunused-command-line-argument]
make: *** [build] Error 1
I tried the script printed by Makefile with the necessary changes and i got this:
GOOS="android" GOARCH=amd64 CGO_ENABLED=1 go build -ldflags=" -X 'main.authorizedKey=GOOS="android" GOARCH=amd64 CGO_ENABLED=1 go build -ldflags=" -X 'main.authorizedKey=ssh-ed25519 lllllllllllloooooooonnnnnnnnggggg-ppppppppuuuuuuubbbbbbbbkkkkkkkkeeeeeeeyyyyyyyy [email protected]' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/
# runtime/cgo
gcc_android.c:6:10: fatal error: 'android/log.h' file not found' -X 'main.localPassword=anybody-who-look-at-this-is-malicious' -s -w" -o bin/
# runtime/cgo
gcc_android.c:6:10: fatal error: 'android/log.h' file not found
And a last thing: on my computer, my NDK tools are in /usr/local/share/android-commandlinetools/ndk/magisk. I wonder there is something wrong in my Android SDK installation.
Metadata
Metadata
Assignees
Labels
No labels