Web Vulnerability
Web Vulnerability
Saharudin Saat
Session_start();
The most common
• No session control (bypass authentication)
• XSS attack (cross site scripting)
• Sql Injection
• Default?
Session Control
Intruder can bypass your system just by inserting the url page!!
Session Control
Recommendation
Use session session_start();
– Every sensitive page must have access level control
E.G if($level =='1')
{
header("Location: admin_menu.php");
}
else if($level=='2')
{
header("Location: approve.php");
} else if($level=='4'){
header("Location: report.php");
Session Control
check if no password entered
if($pwd==''){ redirect to login page again.
?>
<script language="javascript">
alert("not authorized!!");
window.location = "index.php";
</script>
By inserting union statement in the url, attacker can view all login and
password
SQL injection
• The original url appear like this
http://localhost/latihan/staffdetail.php?nostaf=654321
• Attacker then might try to do union sql statement to view
username and password inside login table which appear
like this : -http:
//localhost/latihan/staffdetail.php?nostaf=654321%20uni
on%20select%201,2,userid,katalaluan%20from%20admi
nistrator
Do you realize that other people on the internet can view your default setting?
Default?
Pay attention for any alert from the third party software about your web security
Default?
Thank You