In PHP “==” is used to compare values of two variables, but like PHP the “==” comparison is also weird. When comparing a string and an integer using “==”, PHP will try to convert the string to an integer and then do the comparison. Let’s see how we can exploit it,
Now imagine a website with a hardcoded password (not a good idea )
if($_POST['password'] == "password")
What if we provide 0 (integer) as input? As the “password” string has no number in it, the condition will return true.
“abc” == int(0)
RCE allows an attacker to execute code on a vulnerable machine and the CVSS severity level of RCE is critical (well what more do you need than that?)
Note: Check out this blog for more PHP Pwning and to learn why PHP is targeted.
Similar to the system() function in C, system() in PHP executes all the input as shell commands in the machine. If the user inputs are passed into it, this will lead to Code Execution.
$cmd = $_GET[‘cmd’];
PHP documentation warns developers not you use it without an input sanitization function.
I used to think if a device is not exposed to the public internet, it is safe, because bad actors cannot access them as it has NAT (Network Address Translation) and a firewall in front of the device. Well, let us uncover the truth.
Note: A bit about me, I have been hacking for a while now I have gained some good knowledge in web security. To feed my curiosity I have decided to read all the nominated Web Techniques by Portswigger. This blog series will contain my takeaways from my learning.
This blog is not intended for complete…
Ever wondered what will happen if a billion “lol”s get processed in memory?
The answer is it will crash the server or consume a large chunk of the available resources. Read on to find out how.
XML (Extensible Markup Language) is a meta markup language that is very widely used. It played a huge role in creating the dynamic web we use today (AJAX). XML was the JSON of the AJAX era.
In XML entities are a way of representing an item of data within an XML document, instead of using the data itself. …
<>AKA Gowtham Student at SASTRA Deemed university, Core team member DSC SASTRA </>