Kisi2 soal dan pembagian kelompok D4LJ2012 - Keamanan Data

June 20th, 2012 by Idris

Kel 1: 501 - 517: 5
Kel 2: 502 - 524: 4
Kel 3: 503 - 522: 7
Kel 4: 504 - 518: 6
Kel 5: 505 - 526: 2
Kel 6: 506 - 516: 7
Kel 7. 507 - 529: 1
Kel 8: 509 - 519: 6
Kel 9: 510 - 520: 5
Kel 10: 511 - 521: 7
Kel 11: 512 - 530: 3
Kel 12: 513 - 527: 3
Kel 13: 514 - 523: 1
Kel 14: 515 - 508: 4
KelĀ  15:525 - 10.513: 5
Kel 16: 531 - 528: 2

Soal:
1. aplikasikan suhosin pada php5 untuk menonaktifkan fungsi tertentu (misal: phpinfo) pada subfolder tertentu
2. buat aplikasi portsentry dengan menggunakan shell programming (.sh) dimana program tersebut dengan sekali panggil oleh portsentry dapat melakukan bloking dengan 3 metode yaitu iptables, ip route dan tcpwrapper serta mengirimkan email ip address yang terblokir.
3. buat aplikasi portsentry dengan menggunakan shell programming untuk satu metode (pilih salah satu: iptables/ip route/tcp wrapper) dimana proses bloking hanya berlaku pada periode tertentu saja (seperti fail2ban)
4. buat vpn dengan menggunakan PPTP server dengan BW yang berbeda-beda untuk masing user
5. buat captive portal dengan menggunakan squid
6. Integrasikan PGP pada squirrelmail
7. Integrasikan clamav pada postfix

logout.php

June 6th, 2012 by Idris

<?

$con=mysql_connect(”localhost”,”coba”,”cobaa”);
$db=mysql_select_db(”coba”);
$ip=$_SERVER[’REMOTE_ADDR’];
$ip2=$_SERVER[’HTTP_X_FORWARDED_FOR’];
$query=mysql_query(”delete from `logon` where ip=’$ip’”);
$query=mysql_query(”delete from `logon` where ip=’$ip2′”);
echo $ip;
?>
<h1 align=center><blink> selamat keluar !!!! </blink></h1>

index.php

June 6th, 2012 by Idris

<?

if($_POST[’uri’]!=”" && $_POST[’ip’]!=”" && $_POST[’username’]!=”" && $_POST[’password’]!=”"){
$con=mysql_connect(”localhost”,”coba”,”cobaa”);
$db=mysql_select_db(”coba”);
$ip=base64_decode($_POST[’ip’]);
$url=base64_decode($_POST[’uri’]);
$username=$_POST[’username’];
$password=$_POST[’password’];
if($username==”idris” && $password==”idris”){
$query=mysql_query(”insert into `logon` (`ip`,`status`) values (’$ip’,'1′);”);
echo “<meta http-equiv=’REFRESH’ content=’0;URL=$url’>”;
}
}

?>
<h3 align=center>Please Login Dunk!!!</h3>
<form name=”login” method=”post” action=”">
<table border=”0″ align=”center” width=”445″>
<tr>
<td width=”51%”><div align=right>Username</div></td>
<td width=”49%”><input type=”text” name=”username” size=”30″>
</td>
</tr>
<tr>
<td><div align=right>Password</div></td>
<td><input name=”password” type=”password” id=”password” size=”30″>
<td><input name=”uri” type=”hidden” value=”<?=$_GET[’i']; ?>” size=”30″>
<td><input name=”ip” type=”hidden” value=”<?=$_GET[’j']; ?>” size=”30″>
</td>
</tr>
<tr>
<td colspan=”2″ align=”center”><input name=”submit” type=”submit” value=”Pencet Aku Dunk!!!”></td>
</tr>
</table>

</form>

rewrite.php

June 6th, 2012 by Idris

#!/usr/bin/php
<?php

$con=mysql_connect(”localhost”,”coba”,”cobaa”);
$db=mysql_selectdb(”coba”);
$temp = array();
while ( $input = fgets(STDIN) ) {
$status=false;
$temp = split(’ ‘, $input);
$ips = split(’/',$temp[1]);
$ip = $ips[0];
$uri=$temp[0];
$qq=mysql_query(”SELECT ip FROM logon where status=’1′ and ip=’$ip’”);
$dt=mysql_num_rows($qq);
if($dt >= 1)
$status=true;

$host=parse_url($uri, PHP_URL_HOST);
if($host==”202.9.85.3″)
$status=true;

if (strlen(strstr($host,”eepis-its.edu”))>0)
$status=true;

if ($status==true)
{
$output = $temp[0].”\n”;
}
else {
$output = “302:http://galatea.eepis-its.edu/squid/?j=”.base64_encode($ip).”&i=”.base64_encode($uri).”\n”;
}
echo $output;
}