A shell with a web server for a parent
An interactive bash on wp-02 is connected to an outside address. Walk the process tree back to the web stack, then find the request that started it.
What you’re looking at
An interactive bash on wp-02 is connected to an outside address. Walk the process tree back to the web stack, then find the request that started it.
Your goal: Trace a shell connected to an outside address back to the web request that started it.
- Briefing
- the story: what happened and what evidence you were handed.
- Terminal
- the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
- Walkthrough
- the numbered path. Each step says what to type and what you should see. Hints open one at a time.
- Answer boxes
- under each question step. Type what you found and press Check.
Words you will meet
- EDR
- endpoint detection and response, the security agent on a computer
- PHP
- a language many web servers run
- URL
- web address
- PID
- process ID, the number Linux or Windows gives each running program
- PPID
- parent process ID, the program that started this one
Start with step 1 in the walkthrough. Every step says what to do and what you should see. The whole thing takes about 2 min to talk through.
Briefing
EDR on wp-02 raised a low-confidence alert: bash -i with a network socket on standard input. The site runs WordPress on nginx and php-fpm.
An interactive shell whose ancestor is php-fpm was started by PHP code. The nginx access log will show which script ran just before.
wp-02 · Processes and ports
Type help for the command list and objectives for your tasks. Everything runs in this browser.
Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.
The whole walkthrough
Every step in order, written to be read aloud: 290 words, about 2 min. It gives away every answer, so try the steps first.