Web Security Threats
Web Security Threats
Giuseppe Patern
February 2004
Agenda
Application security
Known attacks
Some suggestions
Goodbye to firewalls
Security in applications
Known threats
Default configuration
Buffer overflow
RootKits
Error handling
SQL/LDAP/XML injection
Default configuration
Buffer overflow
www.linuxjournal.com/article.php?sid=6701
Buffer overflow
/* note that the size of the buffer is 256 bytes, but the loop
inserts 512 bytes of data */
void func(void) {
int i;
char buffer[256];
for (i=0; i<512 ; i++)
buffer[i] = 'x';
return;
}
Buffer overflow
RootKits
www.technicalinfo.net/papers/CSS.html
link.jsp?url=http://www.mysite.com
include.jsp?page=mypage.jsp
link.jsp?url=file:///etc/passwd
include.jsp?page=../../../etc/passwd
Error handling
Error handling
Example:
http://www.mycompany.com/product.php?id=1829249837394
Error at line 125: Unable to perform query: select Date,Object
from where Date > NOW() - INTERVAL 1 YEAR order by Date
:You have an error in your SQL syntax near 'where Date >
NOW() - INTERVAL 1 YEAR order by Date' at line 1
It reveals:
Database
SQL injection
SQL injection
https://www.mycompany.com/servlet/login?userid=shmoe&passw
ord=dumb
https://www.mycompany.com/servlet/login?userid=shmoe&passw
ord=letmein'%20OR%20'a'='a
SQL injection
Opening backdoors
LDAP injection
Example:
https://www.mycompany.com/login.jsp&user=gipp
a&password=letmein)(|(cn=*))
Some suggestions
Change passwords
Some suggestions
But remember:
there is no 100% security!
(Gippa is watching you!)
Thank you!
Giuseppe Patern
gpaterno@gpaterno.com