Let's talk about one thing that has been around for N years. Today, let's announce it.
When the DISCUZ series program SQL injection vulnerability is used to obtain the user's HASH and ucenter uckey, the Administrator's session can be directly constructed, perform any operations as an administrator at the front-end.
The DISCUZ Forum verifies the logon IP address and browser type, but you will know how to bypass it when you look at the code, while uchome is weaker and has no IP restrictions, I will take uchome as an example to illustrate this method:
1. First, the user's HASH is stored in the member table, which interacts with the ucenter and will be updated when the user logs on.
2. After the user logs on, the records will be saved in the session table.
3. If the other party does not exit after logon, the records in the session table will not be deleted.
4. In this case, we can hijack the session.
You can find the authcode function directly in the DZ series program. This function is an original encryption algorithm of DZ. The sessoin generation method is as follows:
Authcode ($ hash. "\ t". $ uid, "ENCODE", $ uckey );
5. After obtaining the session, set the uchome_auth field value in the COOKIE to the session we generated, and you can use the other party www.2cto.com.
6. the next step is to show how it works. There are too many XSS such as UCHOME, and an XSS Trojan is automatically sent to the Administrator's personal homepage. When he logs on to his UCHOME next time, simply accept the password.
Rayh4c blog