
Nmap Development mailing list archives
Re: Ncat lua execution
From: Jacek Wielemborek <d33tah () gmail com>
Date: Wed, 15 Jan 2014 20:57:59 +0100
15/01/2014 20:49:24 Martin Holst Swende <martin () swende se>:
Hi, I've started experimenting a bit with Ncat and the "new" Ncat lua execution. My first experiment wast to make a generic logging SSL/TCP proxy. That's easy: ncat --listen --ssl --ssl-cert test-cert.pem --keep-open --ssl-key test-key.pem -o output.log --hex-dump output-hex.log --sh-exec "ncat --ssl www.dn.se 443" Now, I would also like to modify the traffic on the fly, in either direction. Using a lua-script which converts ASCII-characters to uppercase in http-responses would be a good starting point. Is that kind of modification possible with the new scripting capabilities? After reading up a bit on how ncat command execution works, it seems that the command execution is more aimed at "net-enabling" processes which are otherwise not network-enabled, but perhaps some clever pipe wizardry can be used to achieve the effect I am aiming for..? Alternatively, I guess I could have a script which makes the ssl-connection to the target from "lua-space", but I have a feeling there should be a simpler way...? Best regards, Martin Holst Swende
Hi, I'm the developer behind the feature. --lua-exec, in the current form, will allow you to control Ncat's network response to network input, but not what the program displays or how it handles stdin data. If I undestand you correctly, you'd like to connect to an SSL website, perform a request, and then output it in a modified form, right? If that is the case, this is not yet what Ncat can do with --lua-exec. There was a patch somewhere in SVN history that allowed such manipulation. It was not merged into the trunk though because of its complexity. If you're interested in this branch, it was either ncat-lua-select or ncat-env-ncatins - I included some examples in the ncat/scripts/ directory. Have a look at my README.txt for exact revision numbers as it's not in my nmap-exp directory anymore: https://svn.nmap.org/nmap-exp/d33tah/README.txt Yours, Jacek Wielemborek
Attachment:
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Ncat lua execution Martin Holst Swende (Jan 15)
- Re: Ncat lua execution Jacek Wielemborek (Jan 15)
- Re: Ncat lua execution Martin Holst Swende (Jan 15)
- Re: Ncat lua execution Martin Holst Swende (Jan 16)
- Re: Ncat lua execution Martin Holst Swende (Jan 15)
- Re: Ncat lua execution Jacek Wielemborek (Jan 15)