Skip to content

Commit f56c1b7

Browse files
committed
update site
1 parent fa030ee commit f56c1b7

File tree

8 files changed

+140
-178
lines changed

8 files changed

+140
-178
lines changed

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Source: https://github.com/hexojs/hexo/
44

55
# Site
6-
title: ma4ze-vipa00 blog
7-
description: vipa00 blog - Documenting the mechanics of system failure through red team tactics, CTF writeups, malware analysis, and the path into deeper systems hacking.
8-
author: m4ze-v0
6+
title: ScytheVipa0z
7+
description: vipa0z Blog - Documenting the mechanics of system failure through red team tactics, CTF writeups, malware analysis, and the path into deeper systems hacking.
8+
author: ScytheVipa0z
99
language: en
1010
timezone: ""
1111
favicon: favicon.png

source/_posts/SSRF-exploitation-cheathseet.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ tags:
1111
- web-security
1212
- application-security
1313
---
14+
1415
# \_OVERVIEW
1516

16-
Server-Side Request Forgery (SSRF) is a vulnerability where an attacker tricks a server into making requests on their behalf. This deceptively simple flaw can have devastating consequences, potentially allowing attackers to:
17+
Server-Side Request Forgery (SSRF) is a vulnerability where an attacker tricks a server into making requests to internal resources on their behalf. This deceptively simple flaw can have devastating consequences, potentially allowing attackers to:
1718

19+
- Bypass firewall rules blocking externel access to resources
1820
- Access internal services hidden from the public internet
19-
- Leak sensitive cloud metadata (including credentials!)
21+
- Leak sensitive cloud metadata
2022
- Read local files on the server
2123
- Perform network discovery and port scanning
2224

23-
In this guide, we'll explore SSRF from identification to exploitation, complete with practical demonstrations and real-world bypass techniques.
25+
In this guide, we'll explore SSRF from identification to mitigations, complete with practical demonstrations and real-world bypass techniques.
2426

2527
<!-- more -->
2628

@@ -79,15 +81,14 @@ In real world targets, this behavior is less common because many frameworks incl
7981

8082
---
8183

82-
8384
### Demonstrating SSRF Exploitation Techniques
8485

8586
- [PayloadsAllTheThings Cheatsheet](https://github.htb/swisskyrepo/PayloadsAllTheThings/tree/master/Server%20Side%20Request%20Forgery#tools)
8687
references to articles, cheatsheets, payloads, tools, and bypasses
87-
88+
8889
#### Port Scanning
8990

90-
SSRFs exploitation provide a way to map internal resources such as live machines/local ports.
91+
SSRFs exploitation provide a way to map internal resources such as live machines/local ports.
9192

9293
First, We have identify error messages by inspecting discrepancies between server responses. Comparing how the application responds to open vs. closed ports can reveal valuable information.
9394

@@ -283,8 +284,3 @@ Many developers focus exclusively on blocking IPv4 addresses and completely over
283284
Explores recent SSRF vulnerability reports and identifies common coding patterns and testing techniques. Highly recommend her entire SSRF series, including [Bypassing SSRF Protections](https://vickieli.dev/ssrf/bypassing-ssrf-protection/)!
284285

285286
---
286-
287-
288-
289-
290-

source/_posts/abusing-groovy-script-consoles.md

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,35 @@ title: "Weaponizing Script Consoles In DevOps Environments: Egress Filtering Byp
33
date: 2025-10-22
44
slug: liferay-jenkins-rce
55
tags:
6-
- bind shell
7-
- groovy
8-
- liferay
9-
- jenkins
10-
- RCE
11-
description: "A practical walkthrough of abusing Groovy script consoles in DevOps environments to write persistent JSP bind shells, with techniques for transferring tools (base64), persistence, and post-exploitation tailored for tight scenarios where outgoing network access is blocked by firewalls."
6+
- bind shell
7+
- groovy
8+
- liferay
9+
- jenkins
10+
- RCE
11+
description: "A practical walkthrough of abusing Groovy script consoles in DevOps environments to write persistent java bind shells, with techniques for transferring tools (base64), persistence, and post-exploitation tailored for tight scenarios where outgoing network access is blocked by firewalls."
1212
---
13+
1314
![Liferay Jenkins exploitation banner](../images/banner33.png)
1415

15-
# __OVERVIEW
16+
# \_\_OVERVIEW
17+
1618
Have you ever been in an engagement or CTF where you finally find a Groovy script console… and then discover that outbound connections are blocked? Or you have a basic shell but you just can't get tools to the target using built-in upload methods?
1719

18-
Over the next few minutes I'll show a practical, repeatable approach for turning a Groovy console into a persistent, multithreaded JSP bind shell that lives in the webroot and how to transfer binary tools via base64 encoding (small and large size). This guide serves as a proof of concept; the shell in here is not secure enough for opsec, but it's a starting point for you to build upon.
19-
<!-- more -->
20-
---
20+
Over the next few minutes I'll show a practical, repeatable approach for turning a Groovy console into a persistent, multithreaded java bind shell that lives in the webroot and how to transfer binary tools via base64 encoding (small and large size). This guide serves as a proof of concept; the shell in here is not secure enough for opsec, but it's a starting point for you to build upon.
21+
22+
## <!-- more -->
23+
2124
### Quick Refresher on Bind Shells:
25+
2226
![shelltypes](../images/shelltypes.png)
2327
The top side shows a bind shell: the victim host runs a listener (a shell bound to a TCP port) and the attacker connects into that listener to gain interactive access. The bottom side shows a reverse shell: the attacker runs the listener and the victim initiates an outbound connection back to the attacker, delivering a shell to the attacker's listener.
2428

2529
Reverse shells are the go-to for many red-teamers because they slip out through egress and work around NAT. But when outgoing traffic is tightly restricted (egress-blocked/proxied), you need a plan B. That's when bind shells become essential. In short: a bind shell makes the target listen and waits for an inbound connection. It trades the egress dependency of a reverse shell for a requirement that you can reach the host inbound (or via a pivot you control). That trade can be exactly what you need when defenders have locked down outbound channels.
2630

27-
28-
-----
31+
---
2932

3033
### Groovy Console to Bind Shell:
34+
3135
![Google Script Console showing Groovy code execution](../images/gsc.png)
3236
When your RCE is limited to a Groovy-style script console (in tools such as Jenkins, Liferay, etc.) and the target cannot reach back to you, the console itself becomes your primary file system and transfer channel. This post focuses on turning that console access into a stable way to read/write files and drop tools. Treat the console like a tiny development environment on the target: you can list folders, create files, and write binary blobs (via base64) into disk locations the web server will execute or serve.
3337

@@ -39,7 +43,7 @@ When your RCE is limited to a Groovy-style script console (in tools such as Jenk
3943

4044
1. Initial reconnaissance: Run simple OS commands to identify the environment and locate the webroot.
4145
2. Discover writable paths: Find locations where you can save files that persist and potentially get executed or served.
42-
3. Deploy the bind shell: Write a persistent JSP bind shell to the webroot.
46+
3. Deploy the bind shell: Write a persistent java bind shell to the webroot.
4347
4. Transfer tools: Use base64 encoding to transfer binary tools (if needed).
4448
5. Verify and connect: Test the bind shell and establish a connection.
4549
6. Clean up: Document detection artifacts and remove traces when done.
@@ -61,6 +65,7 @@ pwd, ls -la, id, whoami, env
6165
For Windows:
6266
dir, whoami, echo %USERPROFILE%
6367
```
68+
6469
The full groovy script would look like this:
6570

6671
```groovy
@@ -94,17 +99,16 @@ Tips:
9499
In this step, you use a Groovy script that embeds a Java-based bind shell.
95100

96101
Use this link to access the script:
97-
https://raw.githubusercontent.com/vipa0z/jenkins-liferay--stable-bind-shell/refs/heads/main/persistent_bind_shell.groovy
102+
[https://raw.githubusercontent.com/vipa0z/groovy-rce-bindshell/refs/heads/main/persistent_bind_shell.groovy](https://raw.githubusercontent.com/vipa0z/groovy-rce-bindshell/refs/heads/main/persistent_bind_shell.groovy)
98103

99104
The script performs two main steps:
100-
1. Saves a JSP bind shell to the specified location.
101-
2. Activates the listener once you access the JSP through a URL.
102-
103-
Update the output path in the script to match your Tomcat webroot and modify the port the shell should listen on, then paste the script into your console and run it.
104105

106+
1. Saves a java bind shell to the specified location.
107+
2. Activates the listener once you access the java through a URL.
105108

109+
Update the output path in the script to match your Tomcat webroot and modify the port the shell should listen on, then paste the script into your console and run it.
106110

107-
Hit save, then to enable the listener, browse to your web shell at: `http://site/bindshell.jsp`
111+
Hit save, then to enable the listener, browse to your web shell at: `http://site/bindshell.java`
108112

109113
Connect to the bind shell via netcat:
110114

@@ -115,20 +119,19 @@ rlwrap -cAr nc -nv HOST-IP 3001
115119
Example 2:
116120
rlwrap -cAr nc -nv 172.16.30.10 3001
117121
```
118-
**Note on why multithreading was used:** With many bind shells, it’s easy to accidentally kill the session (for example, by hitting `Ctrl+C`). In early versions of this shell, once the client disconnected, reconnecting with netcat wasn’t reliable. To fix that, the JSP handler accepts new connections in separate threads so a disconnect doesn’t permanently “break” the listener.
119-
120-
---
121122

122-
## Tool Transfers Using the Groovy Script Console
123-
We can use the script console to transfer tools to the file system by first base64-encoding them and then running a script to decode that data into a local file on the target.
124-
Depending on the target environment, some Groovy script console versions only support string variables that are around 6000 characters in length, which requires a bit of improvisation on our side.
123+
**Note on why multithreading was used:** With many bind shells, it’s easy to accidentally kill the session (for example, by hitting `Ctrl+C`). In early versions of this shell, once the client disconnected, reconnecting with netcat wasn’t reliable. To fix that, the java handler accepts new connections in separate threads so a disconnect doesn’t permanently “break” the listener.
125124

126-
### Method 1: For smaller sized tools (e.g., netcat, potato exploits, etc.):
125+
---
127126

128-
**Note:** This will not work if your base64 string is more than 6000 characters in length; you can use Method 2 below instead.
127+
## Script Console as a dropper
129128

129+
We can use the script console for dropping tools on the file system by first base64-encoding them and then running a script to decode that data into a local file on the target.
130+
Depending on the target environment, some console versions only support string variables that are around 6000 characters in length, which requires a bit of improvisation on our side.
130131

132+
### Method 1: Dropping smaller sized tools (e.g., netcat, potato exploits, etc.)
131133

134+
**Note:** This will not work if your base64 string is more than 6000 characters in length; you can use Method 2 below instead.
132135

133136
Base64 encode the tool and copy to clipboard:
134137

@@ -151,28 +154,34 @@ Files.write(dest, bytes)
151154
println "Wrote ${bytes.length} bytes to ${dest}"
152155
```
153156

154-
### For Larger Binaries
157+
### Dropping Larger Binaries
155158

156-
I put together a script that chunks your tools into smaller base64 files (6000 chars per chunk by default), so you can paste them into the console and reassemble them with Groovy.
159+
update: i wrote a dropper generator that generates the groovy script to drop the tool for you, you can use either the dropper here: https://github.com/vipa0z/B64Dropper or continue with the semi-manual method below.
157160

158-
Script: https://raw.githubusercontent.com/vipa0z/Groovy-bind-shell/refs/heads/main/tool_chunker.py
161+
the following is a script that chunks your tools into smaller base64 files, each containing a base64 String variable that is 6000 characters in length, so you can paste them into the console and reassemble them with Groovy.
162+
163+
Script:TODO
159164

160165
Run:
166+
161167
```
162168
python3 tool_chunker.py yourtool.exe -o <output_dir> -s 6000
163169
```
164170

165171
**Options:**
172+
166173
- `-s`: chunk size (default 6000)
167174
- `-o`: output directory
168175
- `-h`: help
169176

170177
The script outputs numbered chunks (`part1`, `part2`, etc.) and shows you what to do next.
171178

172179
**Example:**
180+
173181
```
174182
python3 tool_chunker.py -s 6000 XecretsEz -o xcretsez
175183
```
184+
176185
<img width="819" height="261" alt="image" src="https://github.com/user-attachments/assets/f5e1bf7f-6916-4ca2-bdf5-de0d7caa424b" />
177186

178187
Steps:
@@ -185,7 +194,7 @@ Steps:
185194

186195
---
187196

188-
## Step 5: Verification
197+
## Verification
189198

190199
After dropping the file, sanity check it:
191200

source/about/index.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,17 @@ I'm always open to discussing security, collaboration, or new challenges. If you
3030

3131
Hack The Box Certified Penetration Testing Specialist (HTB CPTS)
3232

33-
`<a id="open-source"></a>`
34-
3533
### Open Source Contributions
3634

3735
| Project | Description |
3836
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3937
| **[Ligolo-NG](https://github.com/nicocha30/ligolo-ng)** (4.1k+ ⭐) | I contributed a usability improvement to ligolo-ng’s autoroute feature. The tool previously didn’t reflect the last-selected interface when rebinding pivot routes, which caused friction during multi-interface pivots. I added state persistence so operators can clearly see which interface was previously selected before binding tunnel addresses. |
4038

41-
`<a id="projects"></a>`
42-
4339
### Projects & Custom Tools
4440

45-
| Project | Description |
46-
| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
47-
| [Jenkins/Liferay Bind Shell](https://github.com/vipa0z/jenkins-liferay--stable-bind-shell) | Multi-threaded Groovy bindshell for bypassing restrictive firewall rules |
48-
| [Secure Network Infrastructure](https://github.com/vipa0z/DEPI-Project-small-secure-network) | Enterprise network with VLAN segmentation, dual firewalls, router-on-a-stick |
49-
| [Vulnserver Exploit](https://github.com/vipa0z/vulnserver-Reverse-shell) | A custom Buffer Overflow exploit for a vulnerable server application |
50-
| [Cheatsheet &amp; Cookbook](https://vipa0z.github.io/cheatsheets) | Active Directory, Web, API, Internal Network exploitation cheatsheets, notes, and methodologies |
41+
| Project | Description |
42+
| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
43+
| [Jenkins java Bindshell using groovy](https://github.com/vipa0z/jenkins-liferay--stable-bind-shell) | Multi-threaded java bindshell for bypassing restrictive firewall rules |
44+
| [Secure Network Infrastructure](https://github.com/vipa0z/DEPI-Project-small-secure-network) | Enterprise network with VLAN segmentation, dual firewalls, router-on-a-stick |
45+
| [Vulnserver Exploit](https://github.com/vipa0z/vulnserver-Reverse-shell) | A custom Buffer Overflow exploit for a vulnerable server application |
46+
| [Cheatsheet &amp; Cookbook](https://vipa0z.github.io/cheatsheets) | Active Directory, Web, API, Internal Network exploitation cheatsheets, notes, and methodologies |

0 commit comments

Comments
 (0)