Security and Cryptography
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationSecurity and Cryptography

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 26th, 2004, 07:02 AM
aussiev8 aussiev8 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 169 aussiev8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 2 h 52 m 43 sec
Reputation Power: 0
my server was hacked

i run vbulletin 3.0.3 with a few 3rd party addon's. i was hacked the other day and the hacker set up a cron job to attack another server. I was just wondering if SQL injection could of triggered this, or how on earth someone can go about doing this, i have no idea how they could of got in, or how they set up the cron job, do they know my cpanel password? its a very crypyic password and would takes years to brute force crack.

how are these guys doing it?

Reply With Quote
  #2  
Old December 26th, 2004, 07:26 AM
mitakeet's Avatar
mitakeet mitakeet is offline
Last Day: May 28, 2005
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2003
Location: Maryland
Posts: 4,575 mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 9 h 51 m 4 sec
Reputation Power: 21
I don't know anything about specific to vbulletin, but a little googling on vbulletin and vulnerabilities ought to get you up to speed. It is not uncommon to get hacked via SQL injection, but it is quite likely that there are easier ways. SQL injection first requires taking over the database (whatever one you happen to have), which is an extra layer of expertise most hackers lack, I suspect that there are other ways to penatrate your machine. If you are not keeping completely up-to-date on ALL patches for ALL your servers and the OS, you are potentially making yourself quite vulnerable. There is also the very real chance that someone is using a new exploit, but if you haven't been keeping up with your patches then they could be using something very old. BTW, when you access your machine is it always via a secure connection like SSH (HTTPS if everything is via the web)? If not, anyone who wants to take the time can sniff your username/password as you authenticate.

If you are interested, I have a little secure programming writeup, you can access it via my sig.
__________________

Left DevShed May 28, 2005. Reason: Unresponsive administrators.
Free code: http://sol-biotech.com/code/.
Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.

It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
--Me, I just made it up

The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
--George Bernard Shaw

Reply With Quote
  #3  
Old December 26th, 2004, 07:32 AM
aussiev8 aussiev8 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 169 aussiev8 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 2 h 52 m 43 sec
Reputation Power: 0
thankyou i will have a read up about it, its not a secure connection to the ftp, how hard would it be to sniff?

Reply With Quote
  #4  
Old December 27th, 2004, 06:44 AM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
There have been a number of major vulnerabilities in PHP announced recently. A lot of php software is affected, including vBulletin. Exploits using these will be multiplying rapidly. Upgrade to 4.3.10 or 5.something ASAP.

phpBB is a MAJOR hole here (there was a worm released last week which uses this to enter a system), so if you're running that on the same server, this is likely to be the point of entry.

The best way to track the intrusion down is to look at your server logs. It should be fairly easy to spot SQL injection attacks. But, I think it's probably those php/vBulletin holes.

Finally, look into using SSH/SCP/SFTP to transfer files instead of FTP etc.

Reply With Quote
  #5  
Old December 27th, 2004, 06:49 AM
mitakeet's Avatar
mitakeet mitakeet is offline
Last Day: May 28, 2005
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2003
Location: Maryland
Posts: 4,575 mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level)mitakeet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 9 h 51 m 4 sec
Reputation Power: 21
While it takes a bit of talent and understanding of network protocols (which I lack the details on), basically all Internet communications are available to all machines connected to the Internet (it is not really that simple, but not much more complex). Therefore anyone with suitable equipment can listen to any communication stream they are interested in hence any unencrypted communication stream is like reading an open book. Someone has to want to go to the trouble, though, but if they want to, then the effort is minimal. What is a bit more likely is there are automated programs probing your machine for known weaknesses and exploiting them automatically, which is why I suggest you get up-to-date on all patches for all software running on your server.

Just as a by-the-by, just because you are convinced your password is too cryptic to guess does not mean that you have really chosen a good password. Lets say that a hacker found a way to get your password hash file off your machine via some exploit through some software you have installed. They can take that hash and use what is called a dictionary attack on it and quite possibly find your password in seconds or minutes by a simple lookup in a pre-hashed dictionary of likely passwords. With disk storage so cheap today, it is not unreasonable to have several hundred gigabytes of pre-calculated password hashes, making the lookup near real-time. The 'dictionary' starts out exactly like one, then they add know variations in how people change capitalization, abreviations and special characters. They may have 10 billion combinations! In any case, I figure the greatest likelyhood is they took advantage of a known vulnerablity in existing software and just created their own account; why go through all this effort if a simple hack can get you what you want.

Reply With Quote
  #6  
Old December 27th, 2004, 06:57 AM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
FWIW: in a lot of older MySQL versions, (4.0 something down IIRC), just knowing the password hash was good enough to give you access.

Reply With Quote
  #7  
Old January 3rd, 2005, 03:06 AM
important important is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 159 important User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 56 m 5 sec
Reputation Power: 5
It might be related to the init.php sql injection bug.. Thought it only works if magic_quotes_gpc is off..
specialtemplate variable is vulnerable and the fix is:

Open init.php file and search for these lines:
$datastoretemp = $DB_site->query("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
WHERE title IN ('" . implode("', '", $specialtemplates) . "')
");
unset($specials, $specialtemplates);

Replace with these :
if(!is_array($specialtemplates))
exit;

$specialtemplate = array();
foreach ($specialtemplates AS $arrykey => $arryval)
{
$specialtemplate[] = addslashes($specialtemplates["$arrykey"]);
}

$datastoretemp = $DB_site->query("
SELECT title, data
FROM " . TABLE_PREFIX . "datastore
WHERE title IN ('" . implode("', '", $specialtemplate) . "')
");
unset($specials, $specialtemplates, $specialtemplate);
__________________
Visit ARDictionary - A free online english - english dictionary!

Reply With Quote
  #8  
Old January 18th, 2005, 06:22 PM
teki associates teki associates is offline
Retired
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 252 teki associates User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 20 sec
Reputation Power: 5
Arrow VBulletin < 3.0.5 can be nuked

Vbulletin versions below 3.0.5 can be nuked. The VB dudes were prudent in not allowing the exploit code to be generally available like the phpBB one.

You are welcome to check out the issue on VBulletin's support pages.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationSecurity and Cryptography > my server was hacked


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT