Starting point machine Error #487: Your port specifications are illegal. QUITTING!


 

if you're trying to solve the hackthebox starting point machine first time 

connect your vpn using openvpn  like this

=> download your vpn file which looks something like this [yourname]--startingpoint.ovpn 

=> open terminal cd into Download 

=> sudo openvpn [yourname]--startingpoint.ovpn 

=> after successfully connected to vpn conection at the end you will see text like this 

Thu Jan 14 23:08:34 2021 Initialization Sequence Completed

 => Now open another terminal without closing the current terminal

now next step is to run the given command 

 ports=$(nmap -p- --min-rate=1000 -T4 10.10.10.27 | grep ^[0-9] | cut -d '/' -f 1 | tr '\n' ',' | sed s/,$//)

 after this command when you run try to run the next command which is 

 nmap -sC -sV -p$ports 10.10.10.27 
you'll probably encounter with this error 
 
nmap -sC -sV -p$ports 10.10.10.27
Starting Nmap 7.80 ( https://nmap.org ) at 2021-01-14 22:52 IST
Error #487: Your port specifications are illegal. Example of proper form: "-100,200-1024,T:3000-4000,U:60000-"
QUITTING!
thre are multiple solution to resolve this error
1. after executing this command 
ports=$(nmap -p- --min-rate=1000 -T4 10.10.10.32 (your ip) | grep ^[0-9] | cut -d '/' -f 1 | tr '\n' ',' | sed s/,$//)
 wait for atleast 15 second and then run next command which is 
nmap -sC -sV -p$ports 10.10.10.27 
2. check running process using 
    ps aux | grep openvpn

kill all the running openvpn process using this command
    sudo killall -9 openvpn  
and then try to kill remaining processes manually using PID like   
    sudo kill -9 13481
then run your vpn again then BOOM!!! it will work  

 





Post a Comment

Previous Post Next Post