Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Assassin2684's website was hacked
Goto page Previous  1, 2
 
Post new topic   Reply to topic Printable version
 View previous topic  Help getting my server up and running Post :: Post Attn: Assembly Nerds  View next topic  
Author Message
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Mon Nov 27, 2006 6:42 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

so you're using your own webserver rather than something like apache?
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Assassin2684
Server Help Squatter


Age:34
Gender:Not sure
Joined: Jul 27 2004
Posts: 990
Location: Florida
Offline

PostPosted: Mon Nov 27, 2006 8:05 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Umm.. I guess? I use Blue Host for all my hosting needs..
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Nov 28, 2006 10:03 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

php.net wrote:
$_FILES['userfile']['type']

The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.


So I guess the attacker just changed his .php MIME type to "image/jpeg" or something, and there ya go.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Nov 28, 2006 10:10 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

It wasn't the webserver. The handler only checks the mime type of what they're uploading (and not the extension), which can be faked easily.

Code: Show/Hide
$_FILES['userfile']['type']

    The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.


Code: Show/Hide
$allowed_types = array( //Allowed types
        "image/gif" => "gif",
        "image/pjpeg" => "jpg",
        "image/png" => "png",
        "image/bmp" => "bmp",
        "image/jpeg" => "jpg",
    );
   
   
    if(!array_key_exists($_FILES['userfile']['type'], $allowed_types)) { // Check the extension if its allowed
        die(" Invalid file type!</font></center>");
    }



EDIT: you son of a bitch cyan
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cerium
Server Help Squatter


Age:42
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Tue Nov 28, 2006 11:50 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

So basically, the guy uploaded a .php file with some forged http headers to make the uploading script think it was a jpeg?

What were you using to allow uploads (For the love of god, don't say phpbb)?
_________________
There are 7 user(s) ignoring me right now.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Assassin2684
Server Help Squatter


Age:34
Gender:Not sure
Joined: Jul 27 2004
Posts: 990
Location: Florida
Offline

PostPosted: Tue Nov 28, 2006 3:00 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

No, I dont use phpbb, all I was using was the upload script. Again, I dont know how the person or why the person even did it. Pretty stupid to hack a site thats not even being used lol.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Nov 29, 2006 10:52 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

Pretty stupid to add a random insecure file uploader to your site. Reminds me of something from hackthissite.org. icon_rolleyes.gif
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Assassin2684
Server Help Squatter


Age:34
Gender:Not sure
Joined: Jul 27 2004
Posts: 990
Location: Florida
Offline

PostPosted: Wed Nov 29, 2006 2:54 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Haha.. ya, I suppose. But it wasn't realy a random one, its one a friend made. But it was my fault I didn't look at the code. Oh well..
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 10 page(s) served in previous 5 minutes.

phpBB Created this page in 0.650384 seconds : 32 queries executed (74.1%): GZIP compression disabled