5

If I try the sV (service detection) flag in nmap run via proxychains (socks5 server) it appears to give me a segmentation fault message:-

root@kali:~# proxychains nmap -n -sT -Pn X.X.X.X -p 22,80,222,10000 -sV
ProxyChains-3.1 (http://proxychains.sf.net)

Starting Nmap 6.46 ( http://nmap.org ) at 2014-07-25 16:40 BST
Segmentation fault

If I remove -sV or limit my scan to certain ports it is OK.

Is this a bug in nmap and/or proxychains and is there any way to fix it?

SilverlightFox
  • 33,408
  • 6
  • 67
  • 178
  • 1
    I can't reproduce with 6.46 and proxychains 3.1. Please include output of `nmap --version` and run your command with `-d` for debugging output. Do you have the same problem if you run directly without proxychains? – bonsaiviking Jul 25 '14 at 16:47
  • we cant tell you which is causing the seg fault. Read your `/var/log/messages` – AK_ Jul 26 '14 at 01:10
  • 1
    Can you please try using this newer and more-complete version of proxychains -- https://github.com/rofl0r/proxychains-ng/ ? – atdre Oct 10 '14 at 15:20

3 Answers3

8

For me, the solution was to disable the DNS through socks:

In the /etc/proxychains.conf file, just comment the line proxy_dns by adding a #:

# proxy_dns
user1156544
  • 456
  • 3
  • 14
tireksz
  • 81
  • 1
  • 1
6

This is a known problem with the classic Proxychains program, which is not currently maintained. Proxychains-NG is a good alternative; it is actively maintained, and does not suffer from this particular crash.

bonsaiviking
  • 11,316
  • 1
  • 27
  • 50
2

It might be useful to identify why the program crashes. I had the same problem when NSE was initiated. Looking at dmesg showed me the following:

[158085.716905] nmap[28540]: segfault at 6 ip b6489234 sp bf89ee6c error 4 in liblua5.2.so.0.0.0[b6483000+36000]
[158389.020572] nmap[28761]: segfault at 6 ip b7380234 sp bf9d61bc error 4 in liblua5.2.so.0.0.0[b737a000+36000]
[158523.581566] nmap[28860]: segfault at 6 ip b73d9234 sp bffbb9bc error 4 in liblua5.2.so.0.0.0[b73d3000+36000]

Which seems to indicate that the problem wasn't directly in proxychains or nmap but in liblua. Updating it to the latest version fixed this bug for me.

Yoram
  • 31
  • 3