- Today, kami belajar tentang kabel fiber optic.
Protection Level Application (Mod Security).... 09/04/08 - 16/04/08
Protection kat level server -> run services:
-apache (web server)
–httpd
-sshd
-vsftpd
-samba
-mail (POP/SMTP)
-nfs
*Perlu ada mod security - filter kat url
Configure
Software needs:
- Apache server (Apache HTTP Server 2.2)
- Mod Security (mod_security-2.5.2-win32)
- Visual C++ 2008 Redistributable Package (vcredist_x86)
- Crimson Editor (cedt370r)
Step to configure:
Install:
- Create .../apache2/modules/mod_security2 and copy mod_security2.so and libxml2.dll to this folder
- Install the Visual C++ 2008 Redistributable Package
Add to your httpd.conf: open Apache HTTP Server 2.2- configure apache server – edit httpd.conf
Edit: open with Crimson Editor
- Copy and paste LoadModule security2_module modules/mod_security2/mod_security2.so
- Enable the module unique_id by uncommenting:
LoadModule unique_id_module modules/mod_unique_id.so
Modified: add index.php DirectoryIndex index.html index.php
A very quick start: copy and paste
SecRuleEngine On
SecDefaultAction log, auditlog, deny, status:403, phase:2, t:lowercase, t:replaceNulls, t:compressWhitespace
SecAuditEngine RelevantOnly
SecAuditLogType Serial
SecAuditLog logs/mod_security2.log
## -- General rules --------------------
SecRule ARGS "c:/" t:normalisePathWin
SecRule ARGS "\.\./" t:normalisePathWin
SecRule ARGS "d:/" t:normalisePathWin
## -- phpBB attack --------------------
SecRule ARGS:highlight "(\x27%27\x2527%2527)"
## -- SQL injection attack -------------------
SecRule ARGS “index.php?username=shaf”
Open file at apache 2.2 – http://localhost/
Web Developer.... 12/03/08 - 08/04/08
Web development ada 2 jenis:
1) Statik
- pure html
- kandungannye statik (content)
- Kalau nak ubah buka file html shj.
2) Dinamik
- content can be anything dynamically loaded into web page
- MySQL & PHP, Access & ASP, Oracle & JSP
- perlukan webserver + MySQL + PHP
System Development Life Cycle (SDLC)
- analysis requirement
- prototype (story board) -> check/ensure req is fullfil
- coding + test (alpha)
- testing (Beta) -> org luar yang test
- handover
A) PROTOTYPE
- Sebelum nak bangunkan sesebuah laman web, kita perlulah membina prototype untuk web tersebut. Untuk tugasan ini, saya bina prototype dengan menggunakan perisian Macromedia Dreamweaver. Ini adalah prototype yang dibina:-
Rajah1: menunjukkan prototype yg dibina. Tujuan kita bina prototype adalah untuk
Rajah 2: Prototype yg dah dimasukkan template.
B) DATABASE
Untuk membangunkan database, kita perlu master dalam 3 command di bawah:
- insert
- update
- delete
arahan untuk:
1) insert
- INSERT INTO std_name VALUE ('ali','1234')
- INSERT INTO staf (staf_nama, staf_id) VALUES ('ali','1234') -> yg biasa digunakan.
2) update
- UPDATE staf SET staf_nama = 'abu' WHERE staf_id = '1234' limit 1
3) delete
- DELETE FROM staf WHERE staf_id = '1234' limit 1
Linux Firewall.... 10/03/08 - 11/03/08
->Linux firewall juga dipanggil netfilter/Iptables. Ia ada 2 rules -> Allow and Deny.
->Iptables:
- Satu perisian untuk mengawal tahap keselamatan dalam sistem jaringan/network.
- Terdapat modul @ polisi untuk mengawal keselamatan sistem jaringan.
- Dipanggil netfilter -> tapis network daripada diceroboh attacker.
- Block,kawal, elak diceroboh attacker.
- Tingkatkan lagi tahap keselamatan dalam network.
Samba ..... 06/03/08
Tujuan:
- Untuk membenarkan 2 Operating System yang berbeza berkomunikasi. Cth: Linux & Windows XP
- Untuk security - authentication
Cara-cara nak configure samba:
Linux Router.... 29/02/08 - 05/03/08
What you need to have?
1) at least 2 nework card
2) 2 cross cable
3) install fedora 8 (for configuration)
What you need to do?
1) set_IP_Forwarding
2) set IP
3) Routing (buat routing + gateway)
Linux sebagai Router:
1) IP-Forwarding - untuk komunikasi antara 2 PC
echo 1 >/proc/sys/net/ipv4/ip_forward
* setiap kali restart, status echo akan jadi 0.
- check status up @ x:
cat/proc/sys/net/ipv4/ip_forward
2) Set IP
3) Set Gateway
Kalau xboleh ping PC -> PC, mungkin disebabkan :
- Firewall - x off
- Antivirus - x off
- IP Forwarding - x up ( setiap kali restart)
- Firewall Linux - uncheck ip tables
> /etc/init.d/network restart
> echo 1 >/proc/sys/net/ipv4/ip_forward
> cat/proc/sys/net/ipv4/ip_forward
> /sbin/ifconfig eth0 (gateway) netmask 255.255.255.0 broadcast (IP PC.255)
> /sbin/route add -net (IP PC.0) netmask 255.255.255.0 gw (gateway) dev eth0
( ulang command ni untuk eth1)
1) up network card
> service network restart [ok] (Cent OS)
> /etc/init.d/network restart (Fedora)
eth0 [ok]
eth1 [ok]
2) tengok routing table
> /sbin/ip route show
3) tengok ada routing @ x
> /sbin/route -v
4) delete routing dalam routing table
> /sbin/route del -net ___________/ gw
5) up network card one by one
> /sbin/ifup eth0
> /sbin/ifup eth1
Kelebihan Linux
- Kebanyakan perisian linux adalah percuma.
- x banyak virus developed for linux ( imune from virus)
- security - open source code (cepat boleh repair)
- Boleh bertindak sebagai server @ client.
- Linux juga boleh jadi web server, procy server, router, ftp, ssh, firewall dll..
- lebih kepada remote komputer (boleh control dari jauh)
-
Firewall For Windows.... 27/02/08
What is firewall?
- adalah pendinding api yang mengawal inbound@outbound network traffic.
- inbound@outbound -> apa sahaja yg masuk dan keluar dalam server or LAN dari network card
- mengawal traffic network - allow & block
- pelindung network.
- untuk control sebarang hubungan antara network luar daripada network card.
- Ia juga digunakan untuk PC.
Is it antivirus?
-No, but ia membantu satu sama lain.
-Contoh: Firewall Panda Integra and Antivirus Panda Defender.
Kenapa perlu Firewall??
- nak kawal inbound & outbound / sebarang komunikasi antara network dgn PC / host daripada network card.
Bagaimana ia bekerja??
-Allow dan Block
-Accept dan Deny
Apa yg firewall blh lakukan??
- Anti Spawm, Anti Malware, filter, P2P & M. (Web Filtering) dgn kawal ip dan port.
- Setiap komunikasi yg berlaku menggunakan ip dan port.
Contoh: 80-HTTP, 21-FTP, 53-DIVS, 110-POP3, 22-ssh, 20-Telnet, 25-SMNP.
Apakah kelemahan topologi ini??
- firewall diasingkan dari router
- secure or tak network bergantung pada topology. Kalau topology lemah, network pun lemah.
- Kalau guna banyak firewall dalam topology, network akan jadi slow.
Remote File Inclusion.... 25/02/08 - 26/02/08
Apa itu RFI?
- Satu teknik yang digunakan untuk menceroboh website internet daripada komputer kawalan jauh.
Kelemahan:
- bila kita guna
- bila full access.
Masalah:
- include $nama (panggil variable) – problem
Hack This Site.... 22/02/08
- basic missions
- realistic missions
- application missions
- programming missions
- logic missions
- extbasic missions
- javascript mission.
Remote SQL Injection.... 21/02/08
Remote SQL Injection?
-Ia sama jgk dengan SQL injection tapi ia berlaku pada url injection/address.
-Cth URL/address Injection: http://www.uum.edu.my/(injection)
Cara-cara:
-Apabila berjaya inject pada url, maklumat senarai username dan password akan dipaparkan.
-Tapi, hanya username dipapar dlm bentuk plaintext.
-Password di papar dlm bentuk hash (md5 coder atau base64 coder).-Password ini perlu di decrypt untuk mendapatkannya dlm bentuk plaintext.
Beza antara SQL Injection dan Remote SQL Injection
1) SQL Injection
- menggunakan magic code cth: 1' or '1'='1
- ia berlaku pada Login Page iaitu pada username dan password.
- inject magic code pada username dan password web yang hendak diceroboh.
2) Remote SQL Injection
- Ia berlaku pada bahagian url/address
- kita perlu paste code injection pada url/address untuk dapatkan username dan password.
- Tapi, password akan dapat dlm bentuk hash (2345THR567THGFCV)
Assigment:
- cari URL injection di milw0rm.com -> web application yg ada vulnerability -> remote SQL injection vulnerability
Cross Site Scripting (XSS).... 19/02/08 - 20/02/08
- Kaedah memasukkan script (biasanya VB script@JAVA script) dikomputer target utk mendapatkan cookies website yg diingini.
- Apabila dpt cookies, ia disimpan dlm server. Oleh itu attacker akan dpt masuk website yg target access td dgn mudah dan senang.
- Kemudian boleh buat malicious code lain (hack cara/kaedah yg lain).
- mana-mana attacker akan hantar mana-mana script pada website user yg ada vulnerabiliti(kelemahan) untuk bypass or masuk ke dlmnya.
- kita kena tau programming dan architecture website.
Contoh:
- setiap web ada cookie(ada id)..so, buat 1 document cookie kemudian hantar script untuk dpt cookie yg dia dh masuk. Then, copy cookie itu dan masukkan ke dlm server.
Arahan Cookies
- Read cookie
- Open new website
- Store cookie
How to protect from SQL injection....18/02/08
- Bila kita dah blh hack web menggunakan SQL injection, so kenalah tau cara2 nak protect dia dari diceroboh dan cara-cara nak elakkan dari SQL injection. Biasanya ia akan protect pada application level dan server level.
Cara-cara nak protect SQl Injection:
- if...else statement (login)
- escape '_' single code.
- parameter statement setkan size (username,password)
- username guna email untuk login
Contoh SQL :
$sql = "select nama_penyelia,thap_penyelia,id_penyelia from penyelia where username ='$name' and password = '$pass';
*letak arahan ini sblm arahan SQL
if($name = ="1' or '1' = '1") {break;}
Tujuan:
1. check $name contain
2. reject klu true; ada single code '1'
nak secure from SQL Injection (website org lain)
- secure kat bahagian server level bahagian mode security (apache).
Orientasi.... 13/02/08


SQL Injection.... 11/02/08 - 15/02/08
Today, aku belajar pasal SQL injection..apa tu? ia adalah salah satu cara nak hack @ ceroboh web org..cara nak guna nye kena pakai magic word..bunyi macam best kan? yelah, sebelum ni duk teruja dengar org blh hack web..So, sekarang aku sendiri pun boleh jadi hacker...hehehe..tapi xla terer sgt pun..tahap atas pegawai la kiranya..
What is SQL Injection?
- SQL injection digunakan untuk hack or ceroboh. Sebenarnya SQL injection terjadi ketika attacker memasukkan beberapa SQL statement ke 'query' dengan cara manipulasi data input ke applikasi tsb. -Ia kod untuk pecah masuk sesuatu system atau website yang mempunyai kata laluan.
- Biasanya Sql Injection dilakukan pada login page pada asp seperti di : admin\login.asp login.asp
* Code yang mana kita gunakan untuk ceroboh vulnerable system -> attack system yang lemah.
Magic Code
Magic code adalah salah satu code untuk menceroboh website org lain tanpa username dan password..Salah satu contoh magic code:
1' or '1'='1
ada byk magic code yg boleh digunakan untuk SQL injection.di bwh ini ada senarai mgic code yg boleh digunakan..
‘or 1=1–
‘or 0=0 –
‘or ‘x’='x
‘or a=a-
“or 0=0 –
“or 0=0 #
“or “x”=”x
“)or(”a”=”a
admin’–
hi” or 1=1 –
hi’ or’a'=’a
hi”)or(”a”=”a
or 0=0 #
‘or a=a–
‘or 0=0 #
‘having 1=1–
“or 1=1–
“or “a”=”a
‘)or(’a'=’a
‘)or(’x'=’x
hi” or “a”=”a
hi’ or 1=1 –
hi’)or(’a'=’a
or 0=0 –
or 1=1–
Cuti Raya Cina.... 07/02/08 - 10/02/08
Yahoo...cuti ..cuti..cuti raye cina, aku xbalik kelate pun..aku p umah member aku kat jitra..dia nak tunang..wah..bestkan..semua kwan2 aku dah tunang n dah kawin pun...
Sniffer....30/01/08 - 06/02/08
Apa itu sniffer?
- sniffer ni maksudnye hidu..ia akan hidu maklumat yang dihantar.
Skill set:
1. IP Addressing
2. Identify - target & source
3. Protocol - TCP/IP
4. Filtering