banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Messages posted by: zero_suto  XML
Profile for zero_suto Messages posted by zero_suto [ number of posts not being displayed on this page: 0 ]
 
các bạn nên download TD removal tool về mà xài thằng này có thể khôi phục hầu hết các tính năng đã bị virut ghi đè lên .Mình đã thử rất hiệu quả.
Thông thường khi các ứng dụng có liên quan đến SQL server bị dính lỗi sql injection thì ta dễ dàng nắm quyền SA của server nhưng vẫn còn một số trường hợp thoạt nhìn sẽ không phát hiện ra lỗi này nhưng thực chất vẫn có những cách khai thác hơi khác thông thường một chút .Bài này mình tìm hiểu từ một số nguồn trên net ,mong các bạn đóng góp ý kiến:
1- Khi 1 ứng dung web thoát khỏi kí tự " ' " hoặc những cái khác tương tự khi nhận dữ liệu từ người dùng có một vài kĩ thuật để đi vòng qua (bypass ) như sau :
funstion escape( input ){
input = replace (input," ' "," " ");
escape = input;
end function


}
trong trường hợp này ta dùng hàm char() để không bị vướng vào sự kiểm soát kí tự thô thiển trên :
ví dụ :
insert into users values(666, char(0x63) + char(0x68) + char(0x72) + char(0x69) +char(0x73) + char(0x63) + char(0x68) + char(0x72) + chả(0x69) +char(0x73),0xffff)
cái này có nghĩa là
insert into users values (666,123,123,0xffff)


2-Mặc dù 1 ứng dụng thoát khỏi dấu nháy đơn nhưng một attacker vẫn có thể tiêm vào một câu lệnh SQL vào quá trình đổi pasword :
đầu tiên attacker tạo ra một username và password bằng cách tạo ra một username mới :
useradmin : admin'--
password : pasword



kết quả của điều này là :
insert into users values (123,'admin"--','password',0xffff)
chúng ta sẽ phân tích đoạn ASP script
username = escape (request.form("username"));
oldpassword = escape (request.form("oldpassword"));
newpassword = escape(request("new password"));
var rso = sever.CreateObject ("ADODB.RecordSet");
var sql = "select * from user where username = ' " + username + "' and pasword = ' " + oldpassword " ';



câu lệnh để đổi password sẽ trông giống như :
sql = "update úe set password =' "+newpassword+ " ' where username =' " + rso("username") " '"
Khi đó thay user và pass của chúng ta vừa mới tạo ta sẽ được câu lệnh sau :

update users set password = 'password' where username ='admin' --'

Em vừa thấy bug này trên 1 số web nhưng trên milwOrm vẫn chưa công bố .Xin mọi người cho biết ý kiến .Hính như sources này ở tranh freshmeat thì phải .
From: Advisory_at_Aria-Security.Net, <Advisory_at_Aria-Security.Net>
Date: 23 Oct 2007 21:12:18 -0000
('binary' encoding is not supported, stored as-is) ________________________________

Aria-Security Team
http://Aria-Security.Net
Persian Security Network
________________________________

Source Code:

<?
/*******************************************************
* COPYRIGHT OSI CODES - PHP Live!
*******************************************************/
session_start() ;
$l = "" ;
// try to get cookie value first
if ( isset( $HTTP_COOKIE_VARS['COOKIE_PHPLIVE_SITE'] ) ) { $l = $HTTP_COOKIE_VARS['COOKIE_PHPLIVE_SITE'] ; }
if ( isset( $HTTP_GET_VARS['l'] ) ) { $l = $HTTP_GET_VARS['l'] ; }
if ( isset( $HTTP_POST_VARS['l'] ) ) { $l = $HTTP_POST_VARS['l'] ; }

if ( !file_exists( "./web/conf-init.php" ) )
{
HEADER( "location: setup/index.php" ) ;
exit ;
}
include_once("./web/conf-init.php") ;
if ( file_exists( "web/$l/$l-conf-init.php" ) && $l )
include_once("./web/$l/$l-conf-init.php") ;
include_once("$DOCUMENT_ROOT/API/Util_Error.php") ;
include_once("$DOCUMENT_ROOT/system.php") ;
include_once("$DOCUMENT_ROOT/lang_packs/$LANG_PACK.php") ;
include_once("$DOCUMENT_ROOT/web/VERSION_KEEP.php") ;
include_once("$DOCUMENT_ROOT/API/Util_CleanFiles.php") ;
include_once("$DOCUMENT_ROOT/API/sql.php" ) ;
include_once("$DOCUMENT_ROOT/API/Users/get.php") ;
include_once("$DOCUMENT_ROOT/API/Users/update.php") ;
include_once("$DOCUMENT_ROOT/API/Chat/remove.php") ;
include_once("$DOCUMENT_ROOT/API/ASP/get.php") ;
?>

Affected file: Index.php
Poc:
/index.php?DOCUMENT_ROOT=file.txt ?
Credits: Aria-Security
The-0utl4w
Received on Oct 24 2007
Mình xin góp ý thêm về finding entry point
ĐỊnh danh các entry points của ứng dụng và chúng làm gì
Xác định cấp độ của truy cập cho mỗi point
Độ nguy hiểm nếu như bị kiểm soát truy cập


tiếp theo nữa là :
Ai có quyền input
Nó chấp nhận những gì
Entry points bị truy cập như thế nào?
Và đây là các entry points thông thường :
Files
-file name extension
-filename without extension
-path
-attribute
-file metadata
-file context
-find file using by application (w3.sysinternals.com)
<ví dụ :man in middle attack , send malformed data from clients ,server>

Sockets
-xác định các open sockets
-Monitoring the Network Traffic

Hypertext Transfer Protocol (HTTP) requests

Named pipes
-Khai thác hạn chế cho phép trong name piped;
-hijack the creation on name pipe
(www.blackewatts.com)
-Impersonate the client
-Checking the Permissions




Pluggable protocol handlers

Malicious server responses

Programmatic interfaces
-RpcDump
-OleView
Structured query language (SQL; databases in general)

Registry
key important :
HKEY_CURRENT_USER (HKCU)

HKEY_USERS (HKU)

HKEY_LOCAL_MACHINE (HKLM)

HKEY_CLASSES_ROOT (HKCR)

HKEY_CURRENT_CONFIG



User interfaces

E-mail

Command-line arguments

Environment variables

Tôi là thành viên mới , và tôi cung rất thích hack - nhưng tôi hoàn toàn không có suy nghĩ để làm người khác bưc mình smilie và phải thú thật là bây giờ tôi cũng chỉ đơn giản là KID (tôi ko thích dùng từ script...... bởi vì dù sao thì hiện tại tôi cũng có nền tảng về C và network ) tôi chỉ muốn cùng các bạn như tôi cùng bắt đầu ở con số 0 , cái mà trước đây tôi chưa bao giờ đọc được trên các diễn đàn và lúc đó tôi ước sao có ai đó làm cái điều đó .Và hôm nay tôi xin mạo muội qua mặt các " tiền bối " nếu có gì thiếu sót mong được các anh ,chị giúp đỡ bởi vì I START AT LEVEL 0

Hôm nay tôi vừa load NESSUS về và lần đầu tiên này tôi mong nó sẽ giúp ích .
Tôi tạm gọi target là YOU.
Sau khi đợi nessus scan YOU xong , tôi có được các kết quả sau :

ipp (631/tcp)


It was possible to freeze or reboot Windows by
reading a MS/DOS device through HTTP, using
a file name like CON\CON, AUX.htm or AUX.

A cracker may use this flaw to make your
system crash continuously, preventing
you from working properly.


Solution: upgrade your system or use a
HTTP server that filters those names out.


Risk Factor : High
CVE : CVE-2001-0386, CVE-2001-0493, CVE-2001-0391, CVE-2001-0558, CVE-2002-0200, CVE-2000-0168, CVE-2003-0016, CVE-2001-0602
BID : 1043, 2575, 2608, 2622, 2649, 2704, 3929, 6659, 6662
Other references : IAVA:2003-t-0003, OSVDB:1817, OSVDB:3781
Plugin ID : 10930




The Linksys BEFSR41 EtherFast Cable/DSL Router crashes
if somebody accesses the Gozila CGI without argument on
the web administration interface.


Solution: upgrade your router firmware to 1.42.7.


Risk Factor : Medium
Plugin ID : 11773


sunproxyadmin (8081/tcp)


It was possible to freeze or reboot Windows by
reading a MS/DOS device through HTTP, using
a file name like CON\CON, AUX.htm or AUX.

A cracker may use this flaw to make your
system crash continuously, preventing
you from working properly.


Solution: upgrade your system or use a
HTTP server that filters those names out.


Risk Factor : High
CVE : CVE-2001-0386, CVE-2001-0493, CVE-2001-0391, CVE-2001-0558, CVE-2002-0200, CVE-2000-0168, CVE-2003-0016, CVE-2001-0602
BID : 1043, 2575, 2608, 2622, 2649, 2704, 3929, 6659, 6662
Other references : IAVA:2003-t-0003, OSVDB:1817, OSVDB:3781
Plugin ID : 10930




The Linksys BEFSR41 EtherFast Cable/DSL Router crashes
if somebody accesses the Gozila CGI without argument on
the web administration interface.


Solution: upgrade your router firmware to 1.42.7.


Risk Factor : Medium
Plugin ID : 11773


sunproxyadmin (8081/tcp)


It was possible to freeze or reboot Windows by
reading a MS/DOS device through HTTP, using
a file name like CON\CON, AUX.htm or AUX.

A cracker may use this flaw to make your
system crash continuously, preventing
you from working properly.


Solution: upgrade your system or use a
HTTP server that filters those names out.


Risk Factor : High
CVE : CVE-2001-0386, CVE-2001-0493, CVE-2001-0391, CVE-2001-0558, CVE-2002-0200, CVE-2000-0168, CVE-2003-0016, CVE-2001-0602
BID : 1043, 2575, 2608, 2622, 2649, 2704, 3929, 6659, 6662
Other references : IAVA:2003-t-0003, OSVDB:1817, OSVDB:3781
Plugin ID : 10930




The Linksys BEFSR41 EtherFast Cable/DSL Router crashes
if somebody accesses the Gozila CGI without argument on
the web administration interface.


Solution: upgrade your router firmware to 1.42.7.


Risk Factor : Medium
Plugin ID : 11773

sunproxyadmin (8081/tcp)


It was possible to freeze or reboot Windows by
reading a MS/DOS device through HTTP, using
a file name like CON\CON, AUX.htm or AUX.

A cracker may use this flaw to make your
system crash continuously, preventing
you from working properly.


Solution: upgrade your system or use a
HTTP server that filters those names out.


Risk Factor : High
CVE : CVE-2001-0386, CVE-2001-0493, CVE-2001-0391, CVE-2001-0558, CVE-2002-0200, CVE-2000-0168, CVE-2003-0016, CVE-2001-0602
BID : 1043, 2575, 2608, 2622, 2649, 2704, 3929, 6659, 6662
Other references : IAVA:2003-t-0003, OSVDB:1817, OSVDB:3781
Plugin ID : 10930




The Linksys BEFSR41 EtherFast Cable/DSL Router crashes
if somebody accesses the Gozila CGI without argument on
the web administration interface.


Solution: upgrade your router firmware to 1.42.7.


Risk Factor : Medium
Plugin ID : 11773



 

sunproxyadmin (8081/tcp)


It was possible to freeze or reboot Windows by
reading a MS/DOS device through HTTP, using
a file name like CON\CON, AUX.htm or AUX.

A cracker may use this flaw to make your
system crash continuously, preventing
you from working properly.


Solution: upgrade your system or use a
HTTP server that filters those names out.


Risk Factor : High
CVE : CVE-2001-0386, CVE-2001-0493, CVE-2001-0391, CVE-2001-0558, CVE-2002-0200, CVE-2000-0168, CVE-2003-0016, CVE-2001-0602
BID : 1043, 2575, 2608, 2622, 2649, 2704, 3929, 6659, 6662
Other references : IAVA:2003-t-0003, OSVDB:1817, OSVDB:3781
Plugin ID : 10930




The Linksys BEFSR41 EtherFast Cable/DSL Router crashes
if somebody accesses the Gozila CGI without argument on
the web administration interface.


Solution: upgrade your router firmware to 1.42.7.


Risk Factor : Medium
Plugin ID : 11773

ndmp (10000/tcp)


The remote web server seems to be vulnerable to a format string attack
on HTTP 1.0 header value.
An attacker might use this flaw to make it crash or even execute
arbitrary code on this host.



Solution: upgrade your software or contact your vendor and inform him
of this vulnerability


Risk Factor : High
Plugin ID : 15642




The remote server is running Webmin.
Webmin is a web-based interface for system administration for Unix.


Solution Stop Webmin service if not needed or configure the access
See menu [Webmin Configuration][IP Access Control]
and/or [Webmin Configuration][Port and Address]

For more info see http://www.webmin.net/

Risk Factor : Medium
Plugin ID : 10757



.....
đó là những cái chính mà tôi nghĩ là có thể "hack " được. Như các bạn cũng thấy ở bug đầu tiên nó thông báo là "system crash" những cái đại loại thế này tôi ko thích nên tôi bỏ qua . Mấy cái còn lại cũng đại loại thế <choáng cả đầu > smilie
"The remote web server seems to be vulnerable to a format string attack on HTTP 1.0 header value" -> thú vị đấy chứ .I love it !!
so you?
tất nhiên tôi cũng không biết nó là gi , tôi lên google và lượm được " bí kiếp " nó đây các bạn a f:
WHAT IS A FORMAT STRING ATTACK?
Format string bugs come from the same dark corner as many other security holes: The laziness of
programmers. Somewhere out there right now, as this document is being read, there is a
programmer writing code. His task: to print out a string or copy it to some buffer. What he means to
write is something like:
printf("%s", str);
but instead he decides that he can save time, effort and 6 bytes of source code by typing:
printf(str);
Why not? Why bother with the extra printf argument and the time it takes to parse through that
silly format? The first argument to printf is a string to be printed anyway! Because the programmer
has just unknowingly opened a security hole that allows an attacker to control the execution of the
program, that’s why!
What did the programmer do that was so wrong? He passed in a string that he wanted printed
verbatim. Instead, the string is interpreted by the printf function as a format string. It is scanned for
special format characters such as "%d". As formats are encountered, a variable number of argument
values are retrieved from the stack. At the least, it should be obvious that an attacker can peek into
the memory of the program by printing out these values stored on the stack. What may not be as
obvious is that this simple mistake gives away enough control to allow an arbitrary value to be
written into the memory of the running program.

Mong là các bạn đã học qua C , tôi thì đã và vẫn đang học C++ nhưng hiện tại thì tất cả bài tập của tôi đều dùng thư viện stdio và stdlib .Và tôi cũng đang đọc để hiểu như các bạn .Theo tôi hiểu thì chỗ này là do lập trình viên ko cẩn thận đã không khai báo đầy đủ các argument cho func printf dẫn đến attacker có thể đánh lừa chương trình làm cho nó hiểu không như ý muốn của người lập trình .Còn chuyện stack gì gì đó thì các bạn nên học kĩ C tôi cũng chưa gọi là thành thạo được nên không dám khua " đao "
bài này còn khá dài các bạn tự down về ngẫm nha
http://muse.linuxmafia.org/lost+found/format-string-attacks.pdf
và nó có ví dụ :
/*
* fmtme.c
* Format a value into a fixed-size buffer
*/
#include <stdio.h>
int
main(int argc, char **argv)
{
char buf[100];
int x;
if(argc != 2)
exit(1);
x = 1;
snprintf(buf, sizeof buf, argv[1]);
buf[sizeof buf - 1] = 0;
printf("buffer (%d): %s\n", strlen(buf), buf);
printf("x is %d/%#x (@ %p)\n", x, x, &x);
return 0;
}

tôi sẽ tra lại lệnh này trong MSDN cho chắc ăn nha các bạn smilie
int printf( const char *format [, argument]... );
Parameters
format
Format control
Optional arguments
cúng như những gì ta đã biết smilie

............ tôi tiếp tục tra và tìm hiểu đoạn chương trình này và các bạn cũng sẽ làm thể chứ?
Sau khi đã hiểu cặn kẽ (đối với từng mức độ) các bạn đã xong chưa vây
tôi thì đã hiểu rồi nói đơn giản thì nhờ vào hàm printf này chúng ta có thể ghi vào vùng nhớ của chương trình mà cụ thể là địa chỉ trả về sau khi nó in ra xong và xin đựoc trích :
SO WHAT?
So what? So what!? SO WHAT!#@?? So you can write arbitrary values to (almost any) arbitrary
addresses in memory!!! Surely you can think of a good use for this. Let’s see: Overwrite a stored UID for a program that drops and elevates privleges. Overwrite an executed command. Overwrite a return address to point to some buffer with shell code in it.
Put into simpler terms: you OWN the program.
Ok, so what have we learned today? printf is more powerful than you previously thought. Cutting corners never pays off. An innocent looking omission can provide an attacker with just enough leverage to
ruin your day. With enough free time, effort, and an input string that looks like the winning entry in last
year’s obfuscated-C contest, you can turn someone’s simple mistake into a nationally
syndicated news story.
WOW ! tôi nghĩ tôi đã hiểu phần nào về format string rồi !

goodbye chúc các bạn và các anh chị một ngày mới vui vẻ
Hẹn gặp lại vào ngày mai và chúng ta sẽ đi sâu vào YOU



0suto

thank you if u read from the begining to here

 

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|