Skip to content

Commit 4225b33

Browse files
committed
site check: file deleted
1 parent 5b12c09 commit 4225b33

37 files changed

+0
-2107
lines changed

_posts/2019-11-24-demystify_java_gadget_chain.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ We need to use `property oriented programming` to build a `RCE gadget` from the
2424
We can use the Java `Runtime` object and its `exec()` method to execute any `system` commands.
2525
- for example, running the `mate-calculator` in linux.
2626

27-
![](image%202.png)
2827

2928
## 2. Command Execution using Reflection API and `Runtime` object
3029
* Java `Reflection API` is used to `examine` or `modify` the `behavior` of methods, classes, interfaces at `runtime`.
3130
- Through reflection API, we can invoke any method at `runtime` via `invoke()` function.
3231
- Here, we are trying to invoke `getRuntime()` method to get a `Runtime` object.
3332

34-
![](image.png)
3533

3634
## 3. Command Execution using `ConstantTransformer` and `InvokerTransformer` together
3735

@@ -45,11 +43,9 @@ Before directly jump into the `Constant Transformer` and `InvokerTransformer`, f
4543
For example, we can create a class `MyReverse` by implementing the `Transformer`interface and `transform()` method.
4644
- Here, in `transform()` method, we specify how to reverse a `String` type object.
4745

48-
![](image%203.png)
4946

5047
When we call the `transform()` method via passing the argument of a `String` type object, it reverses the string.
5148

52-
![](image%204.png)
5349

5450
> The return type of the `transform()` method is `Object` therefore it can return any type of object.
5551
@@ -58,10 +54,8 @@ In contrast to the `Transformer` class, it always returns the `same object` that
5854

5955
- If we Initialize a `ConstantTransformar` with `Runtime.class` and can call the `transform()` method with `any object`(for example, `HashSet`), we will always get the `Runtime.class` type object.
6056

61-
![](image%205.png)
6257

6358
### InvokerTransformer
6459
* During initialization, it takes a `method name` with optional parameters.
6560
* On `transform`, it calls that method for the object provided with the parameters.
6661

67-
![](image%206.png)
-318 KB
Binary file not shown.
-336 KB
Binary file not shown.
-113 KB
Binary file not shown.
-302 KB
Binary file not shown.
-22.9 KB
Binary file not shown.
-352 KB
Binary file not shown.

assets/hpnmm_B.07.53_exploit.assets/hpnnm_B.07.53_exploit_shell_bind_tcp_v1.0.py

Lines changed: 0 additions & 187 deletions
This file was deleted.

assets/hpnmm_B.07.53_exploit.assets/hpnnm_B.07.53_exploit_v0.1.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

assets/hpnmm_B.07.53_exploit.assets/hpnnm_B.07.53_exploit_v0.2.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)