XenForo hacked

Status
Not open for further replies.

giorgino

Well-known member
Hi all. I'm in trouble with one of my board.

The hacker modify my ad_header template with a malicious link
In my admin log:

Schermata 2012-12-19 alle 16.30.17.webp

Code:
array(12) {
  ["titleArray"] => array(1) {
    [537] => string(9) "ad_header"
  }
  ["styleidArray"] => array(1) {
    [537] => string(1) "2"
  }
  ["templateArray"] => array(1) {
    [537] => string(356) "<!-- Inizio Banner Testata 728x90 -->
<div class="ad_header">
 
<!-- immobilio_728:90_header -->
<div id='div-gpt-ad-1338486582932-2' style='width:728px; height:90px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1338486582932-2'); });
</script>
</div>
 
</div>
<!-- Fine Banner Testata 728x90 -->"
  }
  ["addon_id"] => string(7) "XenForo"
  ["style_id"] => string(1) "2"
  ["template_id"] => string(3) "537"
  ["title_original"] => string(9) "ad_header"
  ["includeTitles"] => array(3) {
    [1] => string(13) "ad_header.css"
    [2] => string(9) "ad_header"
    [3] => string(13) "ad_header.css"
  }
  ["_TemplateEditorAjax"] => string(1) "1"
  ["_xfRequestUri"] => string(50) "/admin.php?templates/ad_header.537/edit&style_id=2"
  ["_xfNoRedirect"] => string(1) "1"
  ["_xfResponseType"] => string(4) "json"
}

What can I do? :(
 
You don't use Hostgator do you?
Had to laugh ;) ... but if it is a unmanaged server, you've got to really tighten security your self

Yes. But I think something like a MySql injection.
There are no known SQL injections exploits for XF, I take it this is just a guess... no evidence?

Can you send me your server access logs, I'll look through them... at least we can rule out a brute force of your admin account via the forum login
(I see that you only use QAs, so it would be easy to do)

Your access logs can be found here: http://xenforo.com/community/threads/my-forums-getting-lots-of-spam.35195/page-20#post-442155
 
Google the hacker email to find other people who were compromised.
He used my e-mail... info@.... I don't know how he changed the password with my e-mail...
My e-mail is forum@...

For clarification...
the admin use info@....
I use forum@....

When I demoted admin to non administration user, the hacker overwrited the password of my account (user n.2) changing the e-mail also from forum@.... to info@..... ( I don't know why... both are my e-mail... :confused:)

This our DB users list

Schermata 2012-12-19 alle 19.51.42.webp

php version is 5.3.5 and MySql 5.5.9-log
 
Had to laugh ;) ... but if it is a unmanaged server, you've got to really tighten security your self


There are no known SQL injections exploits for XF, I take it this is just a guess... no evidence?

Can you send me your server access logs, I'll look through them... at least we can rule out a brute force of your admin account via the forum login
(I see that you only use QAs, so it would be easy to do)

Your access logs can be found here: http://xenforo.com/community/threads/my-forums-getting-lots-of-spam.35195/page-20#post-442155
Thank you tenants... I'll send you the log asap! :)
 
Hi
Can you send me your server access logs, I'll look through them... at least we can rule out a brute force of your admin account via the forum login

Looking in the access.log of the http server, I've found some operation from hacker's IP 92.49.155.80


Code:
92.49.155.80 - - [19/Dec/2012:14:25:52 +0100] "-" 400 0 "-" "-" "-"
 
92.49.155.80 - - [19/Dec/2012:15:21:00 +0100] "-" 400 0 "-" "-" "-"
 
92.49.155.80 - - [19/Dec/2012:15:27:40 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:27:40 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:27:40 +0100] "-" 400 0 "-" "-" "-"
 
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
 
92.49.155.80 - - [19/Dec/2012:20:58:09 +0100] "-" 400 0 "-" "-" "-"

Schermata 2012-12-19 alle 21.33.53.webp

but nothing more than this...
 
Hi


Code:
92.49.155.80 - - [19/Dec/2012:14:25:52 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:21:00 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:27:40 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:27:40 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:27:40 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:15:34:10 +0100] "-" 400 0 "-" "-" "-"
92.49.155.80 - - [19/Dec/2012:20:58:09 +0100] "-" 400 0 "-" "-" "-"

Yes you will see them, there might be some useful information here, so get all the data you can from this and save it, since some logs arent always kept around for long (some 24 hours... save the server access log locally now if you can)

RU ip, and he's changed his IP address, I would almost always assume they are using a proxy, so go back as far as you can and look for an IP address that you may not have yet seen, hitting the same location thousands of times (if this is a brute force of the front end)

Do the same for your FTP logs (you have no CPanel, so we can rule that out)

How do you manage your server and access your database (phpMyAdmin or anything else)?... lots of known security issues with old versions of phpMyAdmin

Apache version?

Are you in contact with your host yet?
 
Do you know the entry point? If nginx is not properly configured it can let people upload images with PHP code and execute them.

Try creating a malformed image with PHP code at the top, then visit yoursite.com/image.gif/.php. If the code executes, then this is likely how you were hit.
 
Do you know the entry point? If nginx is not properly configured it can let people upload images with PHP code and execute them.
I don't think that nginx is the door...

Try creating a malformed image with PHP code at the top, then visit yoursite.com/image.gif/.php. If the code executes, then this is likely how you were hit.
Tried. Thank you for suggestion :)
 
You or may not find this useful, but I don't use PHPMyAdmin or any other script based interface to manage my SQL databases and server. If it's a MySQL Server, I use MySQL Workbench to do almost everything.
 
Update:

Seems that wasn't a MySql injection, but a login brute force. After changed the admin password, no more has happened...

In the main time some files .php was injected with malicious code (another iframe code with a file call to 1.php in the root) and a file was added to the root: 1.php
 
Update:

Seems that wasn't a MySql injection, but a login brute force. After changed the admin password, no more has happened...

In the main time some files .php was injected with malicious code (another iframe code with a file call to 1.php in the root) and a file was added to the root: 1.php


For reasons like this, some future version of XF needs to have a login limit.
 
login limit.

User locks

They are present on the ACP, but they need to be present on the forum login/login too
I still haven't seen any evidence that this was a brute force of the login page (nothing in the access logs)

But, when we know this is happening, I'll give this away for free: Login User Locks

Meh.. I'll give it away for free now (why wait for something serious to happen to everyones forum)
 
Status
Not open for further replies.
Top Bottom