Sinisterly
Have some fun with your attackers - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: PHP (https://sinister.ly/Forum-PHP)
+--- Thread: Have some fun with your attackers (/Thread-Have-some-fun-with-your-attackers)

Pages: 1 2


Have some fun with your attackers - RogueCoder - 12-06-2013

So I have had quite a few hack attempts on my server, and of course the first thing they do is to do some recon by sending a HEAD request to get some information about the web server and the PHP version etc. So yesterday I decided to have some fun.

The PHP version is returned in the X-Powered-By header, but this header is easily modified by using PHP's header() function. So let's have some fun with this.

I added this to the top of my site so it's the very first thing being executed.
Code:
$insults = array( 'Your birth certificate is an apology from the condom factory', 'Shut up, you\'ll never be the man your mother is', 'You must have been born on a highway cuz thats where most accidents happen', 'It looks like your face caught on fire and someone tried to put it out with a fork', 'You are so ugly that when your mama dropped you off at school she got a fine for littering', 'You\'re so ugly Hello Kitty said goodbye to you.', 'Your family tree is a cactus because everybody on it is a prick', 'If you were twice as smart, you\'d still be stupid', ); $pos = mt_rand(0,(sizeof($insults)-1)); $xpb = base64_encode($insults[$pos]); header("X-Powered-By: {$xpb}");

What this does is that it changes the X-Powered-By value that is sent when sending a HEAD request to a base64 encoded offensive message. So hopefully I can hit some nerves on someone and really piss them off Smile


Have some fun with your attackers - RogueCoder - 12-06-2013

So I have had quite a few hack attempts on my server, and of course the first thing they do is to do some recon by sending a HEAD request to get some information about the web server and the PHP version etc. So yesterday I decided to have some fun.

The PHP version is returned in the X-Powered-By header, but this header is easily modified by using PHP's header() function. So let's have some fun with this.

I added this to the top of my site so it's the very first thing being executed.
Code:
$insults = array( 'Your birth certificate is an apology from the condom factory', 'Shut up, you\'ll never be the man your mother is', 'You must have been born on a highway cuz thats where most accidents happen', 'It looks like your face caught on fire and someone tried to put it out with a fork', 'You are so ugly that when your mama dropped you off at school she got a fine for littering', 'You\'re so ugly Hello Kitty said goodbye to you.', 'Your family tree is a cactus because everybody on it is a prick', 'If you were twice as smart, you\'d still be stupid', ); $pos = mt_rand(0,(sizeof($insults)-1)); $xpb = base64_encode($insults[$pos]); header("X-Powered-By: {$xpb}");

What this does is that it changes the X-Powered-By value that is sent when sending a HEAD request to a base64 encoded offensive message. So hopefully I can hit some nerves on someone and really piss them off Smile


RE: Have some fun with your attackers - Slarek - 12-06-2013

Some of those jokes are pretty insulting:grin:


RE: Have some fun with your attackers - Slarek - 12-06-2013

Some of those jokes are pretty insulting:grin:


RE: Have some fun with your attackers - RogueCoder - 12-06-2013

@Slarek Lol yeah they are Smile

If someone has some additions to that list, feel free to let me know and I'll add it I like it Smile


RE: Have some fun with your attackers - RogueCoder - 12-06-2013

@Slarek Lol yeah they are Smile

If someone has some additions to that list, feel free to let me know and I'll add it I like it Smile


RE: Have some fun with your attackers - Slarek - 12-06-2013

(12-06-2013, 10:56 AM)shp0ngl3 Wrote: @Slarek Lol yeah they are Smile

If someone has some additions to that list, feel free to let me know and I'll add it I like it Smile

You didn't accept our "Yo mama"-jokes:grin:
They're kinda lame though


RE: Have some fun with your attackers - Slarek - 12-06-2013

(12-06-2013, 10:56 AM)shp0ngl3 Wrote: @Slarek Lol yeah they are Smile

If someone has some additions to that list, feel free to let me know and I'll add it I like it Smile

You didn't accept our "Yo mama"-jokes:grin:
They're kinda lame though


RE: Have some fun with your attackers - Snipa - 12-06-2013


lol careful some may cry because they are mostly kids.



~
@bluedog.tar.gz have gone too far :troll:

Spoiler: enter at own risk



RE: Have some fun with your attackers - Snipa - 12-06-2013


lol careful some may cry because they are mostly kids.



~
@bluedog.tar.gz have gone too far :troll:

Spoiler: enter at own risk