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?

3
  • 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? Jul 25, 2014 at 16:47
  • we cant tell you which is causing the seg fault. Read your /var/log/messages
    – AK_
    Jul 26, 2014 at 1:10
  • 1
    Can you please try using this newer and more-complete version of proxychains -- github.com/rofl0r/proxychains-ng ?
    – atdre
    Oct 10, 2014 at 15:20

3 Answers 3

7

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.

1
  • It's good to know about this Proxychains-NG alternative, thank you. A side note, I found the quick workaround in the other answer by tireksz helpful in squelching the issue in situations where employing NG may not be viable, and where proxy_dns is not required. All of it great info.
    – Ashley
    Nov 15, 2022 at 16:10
9

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
0
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .