-
Notifications
You must be signed in to change notification settings - Fork 0
OS command injection
Alnoman Kamil edited this page Jul 3, 2024
·
24 revisions
Apprentice lab:
OS command injection, simple case
Apprentice lab:
OS command injection, simple case
This lab contains an OS command injection vulnerability in the product stock checker.
The application executes a shell command containing user-supplied product and store IDs, and returns the raw output from the command in its response.
To solve the lab, execute the whoami command to determine the name of the current user.
- Solution
-
mitmproxyis used to intercept when pressing Check stock. - Modify the
POSTrequest in the parameters by adding&whoami. The lab is completed.
-
NOTE:
Simply setting the parameter to the command does not work.
Solutions for the Portswigger's Web Security Academy using mitmproxy and other cli tools instead of Burp Suite
Server-side topics:
- SQL injection
- Authentication
- File path traversal
- OS command injection
- Business logic vulnerabilities
- Information disclosure
- Access control vulnerabilities
- File upload vulnerabilities
- Race conditions
- Server-side request forgery (SSRF)
- XML external entity (XXE) injection
- NoSQL injection
- API testing
- Web cache deception
Client-side topics:
- Cross-site scripting (XSS)
- Cross-site request forgery (CSRF)
- Cross-origin resource sharing (CORS)
- Clickjacking
- DOM-based vulnerabilities
- WebSockets
Advanced topics: