My host machine IP : 192.168.0.108
Guest machine IP : 192.168.0.105
192.168.0.105 has a squid proxy at port 3128. Only through this proxy I can access 192.168.0.105:80 which can be used to detect shellshock vulnerability, which I already know.
But I tried nmap through proxy it doesn't work.
nmap with real porxy port 3128
sudo nmap -sV -p80 --script http-shellshock --proxy http://192.168.0.105:3128 192.168.0.105
Starting Nmap 7.60SVN ( https://nmap.org ) at 2018-02-10 12:28 IST
Nmap scan report for 192.168.0.105
Host is up (0.00039s latency).
PORT STATE SERVICE VERSION
80/tcp filtered http
MAC Address: 34:23:87:2D:DD:6B (Hon Hai Precision Ind.)
Observe it is filtered.
nmap with fake port number 3000
sudo nmap -sV -p80 --script http-shellshock --proxy http://192.168.0.105:3000 192.168.0.105
Starting Nmap 7.60SVN ( https://nmap.org ) at 2018-02-10 12:28 IST
Nmap scan report for 192.168.0.105
Host is up (0.00036s latency).
PORT STATE SERVICE VERSION
80/tcp filtered http
MAC Address: 34:23:87:2D:DD:6B (Hon Hai Precision Ind.)
Same results!!!
If I try to just check the port via proxy that also doesn't work
sudo nmap -sV -p80 --proxy http://192.168.0.105:3000 192.168.0.105
Starting Nmap 7.60SVN ( https://nmap.org ) at 2018-02-10 12:35 IST
Nmap scan report for 192.168.0.105
Host is up (0.00039s latency).
PORT STATE SERVICE VERSION
80/tcp filtered http
MAC Address: 34:23:87:2D:DD:6B (Hon Hai Precision Ind.)
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 1.02 seconds
If I try nikto through proxy, using below command, it works fine.
$ nikto -useproxy http://192.168.0.105:3128 -h 192.168.0.105
WHen I used proxychains After editing its config file, it gave same output:
$ sudo proxychains nmap -sV 192.168.0.105 -p80
ProxyChains-3.1 (http://proxychains.sf.net)
Starting Nmap 7.60SVN ( https://nmap.org ) at 2018-02-10 13:26 IST
Nmap scan report for 192.168.0.105
Host is up (0.00039s latency).
PORT STATE SERVICE VERSION
80/tcp filtered http
MAC Address: 34:23:87:2D:DD:6B (Hon Hai Precision Ind.)
Am using Ubuntu 16.04 x64