• Stars
    star
    137
  • Rank 266,121 (Top 6 %)
  • Language
    Shell
  • License
    Other
  • Created almost 9 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Socat can be used to establish a reverse shell with bash tab completion and full shell functionality

socat-shell

When you get a shell on a linux server you get a really limited level of interactivity. You can use socat to establish a fully interactive shell which allows:

  • Tab autocompletion
  • Job management by CTRL+C and CTRL+Z etc
  • Bash history via CTRL+R etc. Basically you get bash as if you are SSHed into the target.

In order to get this goodness you need to:

    1. Already have a shell on the victim
    1. Have a means of uploading files to the victim
    1. Have an established means of communicating to your listener (using TCP). This tool is not going to find any vulnerbilities for you, or confirm egress filtering. This will only be useful in elevating your existing shell to a more functional one.

The victim must either have "socat" installed, or both "gcc" and "make" so that compilation is possible.

Your listener server must have "socat" installed (by default on Kali).

Upload the socat.tar file to your victim, and use your existing shell access to extract that. By executing "socat-shell.sh" you will achieve the following:

    1. Check for the existence of the "socat" binary in the current directory.
    1. If it does not find that then it will check for "gcc" and "make".
    1. If those pre-reqs are met, then it will extract the socat source and compile it
    1. When successful the binary for "socat" will now exist in the current directory. Additionally, the last lines of output will show how to start your listener and how to execute the connection back from the victim.

Dislaimer

For research purposes only, do not use this on any target which you do not have permission to do so.

More Repositories

1

JS2PDFInjector

Inject a JS file into a PDF file.
Java
211
star
2

java-stager

A PoC Java Stager which can download, compile, and execute a Java file in memory.
Java
110
star
3

ReportCompiler

A tool for importing vulnerability scanner data and then allowing you to manipulate the risks, affected hosts, and create risk ordered output.
Batchfile
79
star
4

cve-offline

An easy to grep dump of the NVD database showing only; CVE-ID, CVSS Risk Score, and Summary.
Python
52
star
5

rdpupload

Python script which will type a file into an RDP session. For when drag and drop and disk mounting is not possible
Python
31
star
6

nmap-summariser

another nmap summarising script
Python
26
star
7

gitshell

A PoC .net shell which uses a GitHub.com repository for the communication channel.
C#
13
star
8

iRecon

Of the thousands of lazy reconnaissance scripts, this one is by far the one in this repository.
Python
11
star
9

ReportCompilerSource

Source Code for ReportCompiler
Java
8
star
10

git-fingerprint

Enumerate information from a target using git
Python
7
star
11

teachingMoments

A collection of cyber security teaching materials.
PHP
7
star
12

git-version

Find out what version of a file you have access to
Python
5
star
13

BurpExtenderForge

An Extender for Burp Suite allowing you to quickly craft Extenders in Burp.
Java
3
star
14

metasploit-modules

A repo where I lob metasploit modules
Ruby
3
star
15

find-encoder

Scripts that help me find encoding mechanisms.
Python
3
star
16

DemoExtender

Code used for a tutorial to get Netbeans GUI editor to work with a Burp Suite Extender
Java
3
star
17

http-options

A dirty script to run HTTP OPTIONS against a list of directories
Python
2
star
18

rdp-enum

PowerShell script that enumerates RDP security settings
PowerShell
2
star
19

ReportCompilerWordMacroDemo

A demo showing a Macro enabled Word Template which can import XML file from ReportCompiler
1
star