OS injection

From PortSwigger Academy

Description

OS command injection (also known as shell injection) is a web security vulnerability that allows an attacker to execute arbitrary operating system (OS) commands on the server that is running an application, and typically fully compromise the application and all its data. Very often, an attacker can leverage an OS command injection vulnerability to compromise other parts of the hosting infrastructure, exploiting trust relationships to pivot the attack to other systems within the organization.

Resources

How to inject

  • Basic commands

  • Chaining commands

  • Inside a command

Blind OS command injection

Confirm the injection

Data exfiltration

  • using netcat listener

  • using cURL

  • using wget

  • using SMB

  • using telnet

  • using icmp

  • using DNS

Last updated

Was this helpful?