Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

While attempting OS Command Injection on a url.com/?ping= parameter, I see that all single quotes ' are being escaped and replaced by '. This is

While attempting OS Command Injection on a url.com/?ping= parameter, I see that all single quotes ' are being escaped and replaced by \\'. This is being done by PHP.

This is problematic because whenever you submit a value to ?ping= it's wrapped with two single quotes (e.g. 1.1.1.1 becomes '1.1.1.1'.

So, sending a traditional payload such as 1.1.1.1;ls becomes '1.1.1.1;ls' (wrapped in single quotes, nullifying the attempt to execute ls.

How can I escape ' to achieve code execution?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

Tell me about the other language(s) you speak.

Answered: 1 week ago

Question

12.3 Explain employment termination of various occupational groups.

Answered: 1 week ago

Question

Define outplacement and severance pay.

Answered: 1 week ago

Question

What would you do?

Answered: 1 week ago