참조 : juniper


download ncui-linux.rpm #

from gate site into /tmp/ncui-linux.rpm

extract rpm #

cd /tmp
rpm2cpio ncui-linux.rpm | cpio –idmv
or
cd /tmp
sudo alien -g ncui-linux.rpm 

create dir and locate file #

mkdir -p ~/.juniper_networks/network_connect/
cd ~/.juniper_networks/network_connect/
sudo cp /tmp/ncui-7.4/usr/local/nc/* .
sudo chown root:root ~/.juniper_networks/network_connect/ncsvc
sudo chmod 6711 ~/.juniper_networks/network_connect/ncsvc
chmod 744 ~/.juniper_networks/network_connect/ncdiag

prepare 32-bit GCC compiler #

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

#if not work
sudo apt-get install libc6-dev:i386 gcc:i386 cpp:i386 cpp-5:i386 gcc:i386 gcc-5:i386 binutils:i386

build executable from libncui.so #

gcc -m32 -Wl,-rpath,`pwd` -o ncui libncui.so
sudo chown root:root ncui
sudo chmod 4755 ncui

get SSL certificate from gate.site #

echo | openssl s_client -connect GATE.SITE.COM:443 2>&1 | sed -ne "/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p" | openssl x509 -outform der > ssl.crt

connect #


get DSID cookie value. ref : juniper VPN DSID 쿠키값 구하기

execute following command(password is blank)
$ ./ncui -h gate.site -c DSID=xxxxxx -f ssl.crt -r Duo-Auth -L 3



compiled #

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2017-01-15 21:30:46
Processing time 0.0123 sec