53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
[[[ StrongSwan Code Command & Control ]]]
|
|
|
|
|
|
|
|
[[ Networking ]]
|
|
# VPN UDP service (StrongSwan ipsec)
|
|
$ nc -zuv 192.168.123.129 500
|
|
$ nc -zuv 192.168.123.129 4500
|
|
|
|
# view all network services
|
|
$ netstat -pntul
|
|
|
|
|
|
# openconnect VPN client (only works for https, cisco style VPN (not IKEv2) )
|
|
$ openconnect -v -c clients/porkypig\@acme.xyz_2018-04-23.21_48_11/porkypig\@acme.xyz.p12 192.168.123.129:500
|
|
|
|
|
|
[[ Service ]]
|
|
|
|
$ sudo ipsec statusall | start | stop
|
|
|
|
|
|
[[ Android ]]
|
|
|
|
# install certificates
|
|
Settings -> Security -> Credential Storage -> Install from SD
|
|
"ca.crt.pem", "client_s.p12"
|
|
|
|
# alias the multi-connections
|
|
alias adb1='adb -s 192.168.123.131'
|
|
alias adb2='adb -s 192.168.123.132'
|
|
|
|
# connect to android IP
|
|
$ adb connect 192.168.123.131
|
|
$ adb connect 192.168.123.132
|
|
|
|
# execute commands to the connected android
|
|
$ adb -s 192.168.123.131 shell
|
|
$ adb -s 192.168.123.132 push client_s.p12 /data/media/0/Download/
|
|
|
|
# restarting adb as root
|
|
$ adb -s 192.168.123.132 root
|
|
$ adb -s 192.168.123.132 shell
|
|
|
|
# push the .p12 file to the Downloads folder of the user storage
|
|
$ adb push client_s.p12 /data/media/0/Download/
|
|
$ adb push ca_i.crt.pem /data/media/0/Download/
|
|
|
|
# using the alias, push the apk, then install
|
|
$ adb2 push strongSwan-1.9.6.apk /data/local/tmp/ss.apk
|
|
$ adb2 shell pm install "/data/local/tmp/ss.apk"
|
|
|