In this presentation, Dmitry Khlebnikov sets forward six broad principles for designing secure IT systems. He also provides a comprehensive overview of "Host-based Security"
In this presentation, Dmitry Khlebnikov sets forward six broad principles for designing secure IT systems. He also provides a comprehensive overview of "Host-based Security"
Secure web programming plus end users' awareness are the last line of defense against attacks targeted at the corporate systems, particularly web applications, in the era of world-wide web.
Most web application attacks occur through Cross Site Scripting (XSS), and SQL Injection. On the other hand, most web application vulnerabilities arise from weak coding with failure to properly validate users' input, and failure to properly sanitize output while displaying the data to the visitors.
The literature also confirms the following web application weaknesses in 2010: 26% improper output handling, 22% improper input handling, and 15% insufficient authentication, and others.
Abdul Rahman Sherzad, lecturer at Computer Science Faculty of Herat University, and Ph.D. student at Technical University of Berlin gave a presentation at 12th IT conference on Higher Education for Afghanistan in MoHE, and then conducted a seminar at Hariwa Institute of Higher Education in Herat, Afghanistan introducing web application security threats by demonstrating the security problems that exist in corporate systems with a strong emphasis on secure development. Major security vulnerabilities, secure design and coding best practices when designing and developing web-based applications were covered.
The main objective of the presentation was raising awareness about the problems that might occur in web-application systems, as well as secure coding practices and principles. The presentation's aims were to build security awareness for web applications, to discuss the threat landscape and the controls users should use during the software development lifecycle, to introduce attack methods, to discuss approaches for discovering security vulnerabilities, and finally to discuss the basics of secure web development techniques and principles.
Introduction to Web Application Penetration TestingAnurag Srivastava
Web Application Pentesting
* Process to check and penetrate the security of a web application or a website
* process involves an active analysis of the application for any weaknesses, technical flaws, or vulnerabilities
* Any security issues that are found will be presented to the system owner, together with an assessment of the impact, a proposal for mitigation or a technical solution.
Vulnerabilities in modern web applicationsNiyas Nazar
Microsoft powerpoint presentation for BTech academic seminar.This seminar discuses about penetration testing, penetration testing tools, web application vulnerabilities, impact of vulnerabilities and security recommendations.
Thick Client Penetration Testing
You will learn how to do pentesting of Thick client applications on a local and network level, You will also learn how to analyze the internal communication between web services & API.
In present world, where computers/laptops and smart phone made it possible to extract other's secrets, a need has been imminent to handle such problems by Cyber Security Regime, which not only be launched by individuls(IT Expert) of organizations but the governments of the country should also play a vital role.
Secure web programming plus end users' awareness are the last line of defense against attacks targeted at the corporate systems, particularly web applications, in the era of world-wide web.
Most web application attacks occur through Cross Site Scripting (XSS), and SQL Injection. On the other hand, most web application vulnerabilities arise from weak coding with failure to properly validate users' input, and failure to properly sanitize output while displaying the data to the visitors.
The literature also confirms the following web application weaknesses in 2010: 26% improper output handling, 22% improper input handling, and 15% insufficient authentication, and others.
Abdul Rahman Sherzad, lecturer at Computer Science Faculty of Herat University, and Ph.D. student at Technical University of Berlin gave a presentation at 12th IT conference on Higher Education for Afghanistan in MoHE, and then conducted a seminar at Hariwa Institute of Higher Education in Herat, Afghanistan introducing web application security threats by demonstrating the security problems that exist in corporate systems with a strong emphasis on secure development. Major security vulnerabilities, secure design and coding best practices when designing and developing web-based applications were covered.
The main objective of the presentation was raising awareness about the problems that might occur in web-application systems, as well as secure coding practices and principles. The presentation's aims were to build security awareness for web applications, to discuss the threat landscape and the controls users should use during the software development lifecycle, to introduce attack methods, to discuss approaches for discovering security vulnerabilities, and finally to discuss the basics of secure web development techniques and principles.
Introduction to Web Application Penetration TestingAnurag Srivastava
Web Application Pentesting
* Process to check and penetrate the security of a web application or a website
* process involves an active analysis of the application for any weaknesses, technical flaws, or vulnerabilities
* Any security issues that are found will be presented to the system owner, together with an assessment of the impact, a proposal for mitigation or a technical solution.
Vulnerabilities in modern web applicationsNiyas Nazar
Microsoft powerpoint presentation for BTech academic seminar.This seminar discuses about penetration testing, penetration testing tools, web application vulnerabilities, impact of vulnerabilities and security recommendations.
Thick Client Penetration Testing
You will learn how to do pentesting of Thick client applications on a local and network level, You will also learn how to analyze the internal communication between web services & API.
In present world, where computers/laptops and smart phone made it possible to extract other's secrets, a need has been imminent to handle such problems by Cyber Security Regime, which not only be launched by individuls(IT Expert) of organizations but the governments of the country should also play a vital role.
Bypass web security dengan menggunakan teknik XST (Cross Sites Tracing)
1. Bypass web security dengan menggunakan
teknik XST (Cross Sites Tracing)
1. Background Information
XST (Cross Sites Tracing) adalah salah satu teknik bypass web security dengan
menggabungkan antara bug XSS dan Request Method TRACE yang ada pada HTTP
Protocol.
XSS adalah salah satu jenis serangan injeksi code (code injection attack). XSS
dilakukan oleh penyerang dengan cara memasukkan kode HTML atau client script code
om
lainnya ke suatu situs. Serangan ini akan seolah-olah datang dari situs tersebut.
l.c
Sedangkan penjelasan tentang HTTP Protocol dapat anda baca pada artikel saya
gm
TRACE Request Method.
al
@
1.1.
ai
sebelumnya http://virtuemagz.com/http-protocol-basic.html.
riz
Http “TRACE” request (berisi request line, headers, post data) dikirim ke trace yang
ar
k.
mendukung web server, yang memberikan informasi isi request client, dengan kata lain
m
“TRACE” memberikan kemudahan untuk mengatakan apa yang HTTP client kirim, dan apa
&
yang server terima.
l.c
om
Beberapa web server seperti Apache, IIS masih support TRACE yang didefinisikan
ai
dengan HTTP/1.1 atau HTTP/1.0 dan terbuka secara default. Sedikit sekali system
gm
administrator men-disable request method ini karena tidak mengetahui resikonya. Saat ini
@
banyak system administrator melakukan pengaturan secara default karena masih dianggap
tik
cukup baik atau hanya karena mereka tidak memiliki pilihan untuk melakukan selain itu.
ca
n
Lalu bagaimana cara untuk mengetahui kalau TRACE pada web server anda berstatus
in
d
ri.
“terbuka” ? Cara yang lebih mudah adalah menggunakan backtrack / kali linux.
Skenario uji 1: webserver apache (XAMPP v3.1.0) diinstal secara default di windows XP
SP 2 dengan IP address : 192.168.91.128. Uji coba akan dilakukan dengan menggunakan
kali linux.
Gambar 1. Tampilan IP Address
2. Kita akan mencoba dengan menggunakan tool netcat. Netcat disebut juga dengan
swiss army knife pada network utility, yang memiliki kemampuan untuk melakukan “banner
grabbing”. Banner grabbing adalah ketika kita connect ke suatu host dan dapat melihat
informasi berharga pada host tersebut, seperti service yang berjalan, dll.
Kita bisa menggunakan console yang ada pada kali linux, lalu ketikkan :
1. nc 192.168.91.128 80 (enter)
maksudnya :
nc
: adalah untuk memanggil netcat
192.168.91.128 : adalah IP pada host target
80
: adalah port yang dituju
om
2. TRACE / HTTP/1.0 (enter)(enter)
ai
gm
TRACE : request method yang ingin diketahui statusnya
l.c
Maksudnya :
al
@
“/” : root dari web server yang kita minta
gm
ai
l.c
om
&
m
ar
k.
3. Selanjutnya akan muncul seperti gambar 2
riz
HTTP/1.0 : protokol yang digunakan
ca
n
tik
@
Gambar 2. Request Method Trace terbuka
in
d
terbuka.
ri.
Pada gambar 2 terlihat HTTP/1.1 200 OK menjelaskan bahwa request method TRACE
1.2.
HttpOnly Cookie Option
HttpOnly adalah sebuah HTTP Cookie option yang digunakan untuk informasi browser
(detil browser yang support HttpOnly) dengan tidak mengijinkan bahasa scripting lain
(JavaScript, VBScript, dll) untuk akses ke “document.cookie” object (normal XSS attack
target). Sebagai informasi bahwa uji coba di artikel ini menggunakan browser IE6 (internet
explorer 6) yang hanya ada dan berjalan di windows XP SP1.
Untuk melihat versi dari internet explorer pada windows XP SP1 dapat dilakukan dengan
cara klik menu help lalu pilih about internet explorer, sehingga akan muncul window seperti
dibawah :
3. om
l.c
ai
gm
al
@
Gambar 3. Versi internet explorer
riz
2. Analisis
ar
k.
Tantangannya adalah bagaimana cara untuk mendapatkan akses ke cookies data string
m
yang terdapat “document.cookie” yang menggunakan httpOnly. Disini kita membutuhkan
l.c
om
&
TRACE untuk membuat semuanya menjadi jelas, maksudnya TRACE akan memanggil
informasi yang anda kirim dalam HTTP Request yang didalamnya ada cookie dan web
ai
authentication string.
gm
Bukan suatu hal yang mudah memaksa internet explorer untuk mengirim TRACE
@
request. Sedangkan faktanya internet explorer tidak support HTTP REQUEST METHOD
ca
n
tik
selain method GET dan POST yang digunakan dalam HTML form.
Untuk mengatasi batasan itu kita menggunakan teknologi client-side scripting. Untuk
in
d
ri.
membuat dan mengirim format HTTP request khusus ke target web server. Caranya?
Kita harus dapat membuat suatu code dengan menggunakan ActiveX control XMLHTTP,
yang akan mengirim TRACE request ke server target. Internet explorer akan mengirim
general browser header secara default dan hasilnya akan tampil dalam bentuk JavaScript
alert window. Apabila browser anda memiliki cookie dari target domain atau login kedalam
web server menggunakan web authentication, anda akan dapat melihat cookie yang akan
muncul pada alert. Perlu diketahui bahwa semua informasi sensitif masih dapat diakses
walaupun melalui link SSL.
Apakah browser yang dapat digunakan hanya internet explorer saja? Tentu saja
tidak, Mozilla/Netscape juga dapat digunakan. TRACE Request dapat dikirim dengan
memanfaatkan XMLDOM object scripting.
4. 3. Uji Coba
Masih menggunakan scenario uji diatas, kita akan melakukan uji coba XST dengan
menggunakan browser internet explorer 6 yang ada pada windows XP SP1.
Scenario uji 2: untuk melakukan uji coba XST, kita memerlukan sebuah website yang
mengandung vulnerability XSS, untuk itu kita gunakan web DVWA, anda dapat
mendownload DVWA secara gratis di url : http://sourceforge.net/projects/dvwa/
Letakkan DVWA di xampp yang telah anda install di windows XP SP1 lalu kemudian lakukan
konfigurasi.
om
Uji coba 1 : untuk vulnerability XSS reflected dengan tingkat security low , dengan
l.c
menggunakan internet explorer yang ada pada windows XP SP1.
gm
ai
1. Masukkan script berikut ke text field untuk membuktikan adanya vulnerability XSS:
l.c
om
&
m
ar
k.
riz
al
@
<script>alert(document.cookie)</script>
in
d
ri.
ca
n
tik
@
gm
ai
Gambar 4. text fied untuk memasukkan script XSS
Gambar 5. hasil setelah script XSS di submit
Pada gambar 5 sessionid dapat terlihat, sehingga kita bisa melakukan uji coba script XST.
5. 2. Selanjutnya kita bisa memasukkan script XST seperti berikut :
<script>
var x = new ActiveXObject('Microsoft.XMLHTTP');
// khusus IE
x.open('TRACE', '/dvwa', false);
x.setRequestHeader('Max-Forwards', '0');
x.send();
// khusus IE
alert(x.responseText);
m
ar
k.
riz
al
@
gm
ai
l.c
om
</script>
l.c
om
&
Gambar 6. hasil setelah script XST di submit
Apabila kita perhatikan cookie nya, cookie yang dihasilkan sama.
gm
ai
3. Untuk mencoba cookie yang kita dapatkan apakah memang bisa digunakan, kita
@
akan menginstall firefox 25.0 dan ditambah dengan addons web developer
in
d
ri.
ca
n
tik
4.
Gambar 7. Addons web developer
6. 4. Klik toolbar cookies dan edit value yang terlihat di kotak merah, dengan cookie yang
m
ar
k.
riz
al
@
gm
ai
l.c
om
kita dapatkan tadi
l.c
om
&
Gambar 8. Window untuk edit cookie
in
d
ri.
ca
n
tik
@
gm
ai
5. Lalu kemudian jalankan kembali dvwa
Gambar 9. Masuk DVWA tanpa login.
7. Ujicoba 2 : dengan menggunakan Mozilla firefox 1.0.7
Masukkan code berikut :
<script>
var x = new XMLHttpRequest();
// khusus firefox
x.open('TRACE', '/dvwa', false);
x.setRequestHeader('Max-Forwards', '0');
x.send("");
// khusus firefox
alert(x.responseText);
</script>
l.c
om
&
m
ar
k.
riz
al
@
gm
ai
l.c
om
Maka hasilnya akan tampak seperti pada gambar berikut :
in
d
ri.
ca
n
tik
@
gm
ai
Gambar 10. Ujicoba XST pada firefox
8. Kemudian kita akan mencoba untuk memasukkan cookie yang kita dapatkan, cara untuk
l.c
om
&
m
ar
k.
riz
al
@
gm
ai
l.c
om
melakukan edit cookie sama dengan yang dibahas diatas :
in
d
ri.
ca
n
tik
@
gm
ai
Gambar 11. Window untuk edit cookie
9. 4. Solusi
Letakkan konfigurasi tambahan tersebut di bagian baris paling bawah di dalam file
httpd.conf, kemudian jangan lupa restart service apache nya.
Sekarang kita melakukan uji coba sekali lagi untuk menguji apakah solusi ini berhasil atau
in
d
ri.
ca
n
tik
@
gm
ai
l.c
om
&
m
ar
k.
riz
al
@
gm
ai
l.c
om
tidak dengan langkah-langkah yang sama seperti yang sudah kita lakukan di atas ;)
Gambar 12. Solusi script untuk TRACE
10. om
l.c
gm
ai
Gambar 13. Solusi TRACE berhasil
al
@
Dan ternyata hasil nya sudah berbeda, tampak pada gambar 13 bahwa kita sudah tidak bisa
ar
k.
riz
bermain-main lagi dengan si “TRACE” ini .
m
5. Kesimpulan
&
Celah XST / TRACE hanya bisa berhasil di eksekusi pada browser Internet Explorer versi 6
l.c
om
yang ada di Windows XP SP 1, sedangkan firefox hanya sampai di versi 1.0.7, dari Windows
ai
XP SP 1 s/d SP 3 sukses semuanya .
gm
Untuk berikutnya jika ingin bermain-main dengan browser dan system operasi (OS) selain di
@
artikel ini, bisa di lakukan dengan menggunakan metode seperti di atas.
tik
Jadi inti nya, selalu melakukan update terhadap versi browser yang selalu kita gunakan,
ca
n
agar tidak kena dampak dari celah ini jika apache nya belum di patch, walaupun setelah
in
d
ri.
update versi browser nya membuat laptop / PC kita semakin lambat, karena rata-rata
browser terbaru / modern menggunakan resource memory yang cukup besar , seperti
pepatah yang mengatakan: “Keamanan berbanding terbalik dengan kenyamanan ”.
Penulis:
-
Indri (indri.cantik@gmail.com)
-
Mark (mark.rizal@gmail.com)