SlideShare a Scribd company logo
1 of 38
Download to read offline
1
Web	service	security
with	OWASP	ZAP
LongTV
About me
• Tạ Vũ Long
• Dev at GMO-Z.com
Vietnam Lab Center
2
3
Agenda
I			– Yêu cầu phi	chức năng:	security
II		– Giới thiệu OWASP	ZAP
III	– Demo
IV	– Kết luận
4
Agenda
I			– Yêu cầu phi	chức năng:	security
II		– Giới thiệu OWASP	ZAP
III	– Demo
IV	– Kết luận
5
Non-Functional	requirements
Vs
Functional	requirements
6
Ví dụ về Non-Functional	requirements
• Performance	– for	example	Response	Time,	Throughput,	 Utilization,	Static	
Volumetric
• Scalability
• Capacity
• Availability
• Reliability
• Recoverability
• Maintainability
• Serviceability
• Security
• Regulatory
• Manageability
• Environmental
• Data	Integrity
• Usability
• Interoperability
• …
7
8
Vulnerabilities
1) SQL	Injection
2) OS	Command	Injection
3) Unchecked	Path	Parameter	/	Directory	Traversal	
4) Improper	Session	Management
5) Cross-Site	Scripting
6) CSRF	(Cross-Site	Request	Forgery)
7) HTTP	Header	Injection
8) Mail	Header	Injection
9) Lack	of	Authentication	and	Authorization	
9
https://www.ipa.go.jp/security/vuln/websecurity.html
10
SQL	Injection
11
https://www.ipa.go.jp/security/vuln/websecurity.html
Cross-Site	Scripting
12
https://www.ipa.go.jp/security/vuln/websecurity.html
13
Phòng chống SQL	Injection
• Prepared	Statements	(with	Parameterized	
Queries)***
• White	List	Input	Validation
• Escaping	tất cả những j	user	nhập
• Stored	Procedures:	tạo các procedures	để
thực thi các khối query
14
Phòng chống XSS
• Mặc định không cho nhập những dữ liệu ko
tin	tưởng,	chỉ cho phép những nơi cần thiết.
• Escape	mọi web	page	elements	mà show	
content	ra trên trình duyệt web:	
(htmlspecialchars)
– VD:	<	(&lt;	),	>(&gt;	),	&	(&amp;	)	
• Đối với cookies	quan trọng ta	sử dụng cờ
HTTPOnly để tránh bị trộm cookies	qua	js.
• Thêm header	“X-XSS-Protection”	vào response
15
Nguy cơ tiềm tàng
• 96%	các ứng dụng tồn tại các lỗ hổng bảo mật
16
https://www.info-point-security.com/sites/default/files/cenzic-vulnerability-report-2014.pdf
Khắc phục sự cố
17
WEB APPLICATIONS SECURITY STATISTICS REPORT 2016
Vấn đề
• Không đưa security requirement vào
• Giải quyết ko triệt để
– Team member thiếu kiến thức về bảo mật
– Không đủ time, cost,…
18
19
Agenda
I			– Yêu cầu phi	chức năng:	security
II		– Giới thiệu OWASP	ZAP
III	– Demo
IV	– Kết luận
20
21
OWASP
• OWASP	:	Open	Web	Application	
Security	Project
• 2001/09/09	by	Mark	Curphey (	đang
là Founder	and	CEO	of SRC:CLR
(SourceClean)
22
OWASP	Projects
• Hàng trăm projects:
– https://www.owasp.org/index.php/Category:OWA
SP_Project
• Phổ biến:
– OWASP	top	ten:	công bố 10	loại tấn công phổ biến
nhất (	3	năm 1	?)
– OWASP	ZAP:	security	scanner
– List	attack	types	:	
https://www.owasp.org/index.php/Category:Attac
k
23
OWASP	Projects
24
OWASP	ZAP
• ZAP:	Zed	Attack	Proxy
• Project	tích cực nhất của OWASP
• Cross-Platform
• Open-Source:	https://github.com/zaproxy/zaproxy/
• Awards
– 2015	Bossie award	for	The	best	open	source	
networking	and	security	software
– Top	Security	Tools	of	2014	as	voted	by	ToolsWatch.org
:	2nd
– Top	Security	Tool	of	2013	as	voted	by	ToolsWatch.org:	
1st
25
Benchmarks
• The	WIVET	Score	of	Web	Application	
Scanners	(18/09/2016)
– Vị trí thứ 5	(Unified)
– Vị trí thứ 4	(Free/	Open	Source)
26
http://sectoolmarket.com/wivet-score-unified-list.html
Tools
• The Spiders: crawler ( sử dụng AJAX
Spiders để scan các AJAX request )
• Proxy: Recorder , để giúp tạo những data
hợp lệ khi attack.
• Active và Passive Scanning: quét lỗ
hổng chủ động và bị động
27
Tools
• Fuzzer:	gửi những data	không hợp lệ,	không
mong muốn.
• Changing	requests	and	Responses : allows	
you	to	specify	as	complex	a	criteria	as	you	
need	
28
Tools
• ZAP	REST	API:	tương tác vs	ZAP	thông qua	API
• Continuous	Integration:	tích hợp security	
scanner	vào vòng phát triển liên tục.
29
30
Đủ chưa??
31
Other
• OS	level	:	vulnerability	scanner
– Lynis:	http://www.tecmint.com/linux-security-
auditing-and-scanning-with-lynis-tool/
• Source	scanner:
– http://techbeacon.com/13-tools-checking-
security-risk-open-source-dependencies-0
32
Đủ chưa??
33
34
35
Agenda
I			– Yêu cầu phi	chức năng:	security
II		– Giới thiệu OWASP	ZAP
III	– Demo
IV	– Kết luận
36
Kết luận
• Đưa security	requirement	vào process.
• Đào tạo kiến thức về security	cho tất cả team	
member.
• Có policy	về security	trong quá trình phát
triển,	vận hành,	maintain.
• Sử dụng các tool	và nên tích hợp vào CI.
37
38

More Related Content

Similar to Web service security

ITLC - Hanoi - NodeJS - ArrowJS - 27-11 - 2015
ITLC - Hanoi - NodeJS - ArrowJS - 27-11 - 2015ITLC - Hanoi - NodeJS - ArrowJS - 27-11 - 2015
ITLC - Hanoi - NodeJS - ArrowJS - 27-11 - 2015IT Expert Club
 
Trung tâm đào tạo
Trung tâm đào tạoTrung tâm đào tạo
Trung tâm đào tạoLuc Cao
 
Dien toan dam may nguon mo - Ung dung trung tam du lieu Da Nang
Dien toan dam may nguon mo - Ung dung trung tam du lieu Da NangDien toan dam may nguon mo - Ung dung trung tam du lieu Da Nang
Dien toan dam may nguon mo - Ung dung trung tam du lieu Da NangMinh Le
 
Dien toan dam may nguon mo - ung dung o trung tam du lieu da nang
Dien toan dam may nguon mo - ung dung o trung tam du lieu da nangDien toan dam may nguon mo - ung dung o trung tam du lieu da nang
Dien toan dam may nguon mo - ung dung o trung tam du lieu da nangmangvn
 
Web application-security
Web application-securityWeb application-security
Web application-securityVisla Team
 
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)Luc Cao
 
SFD2013 OpenStack ứng dụng tại Trung tâm dữ liệu Đà Nẵng
SFD2013 OpenStack ứng dụng tại Trung tâm dữ liệu Đà NẵngSFD2013 OpenStack ứng dụng tại Trung tâm dữ liệu Đà Nẵng
SFD2013 OpenStack ứng dụng tại Trung tâm dữ liệu Đà NẵngLe Cuong
 

Similar to Web service security (9)

Bảo mật ứng dụng web
Bảo mật ứng dụng webBảo mật ứng dụng web
Bảo mật ứng dụng web
 
ITLC - Hanoi - NodeJS - ArrowJS - 27-11 - 2015
ITLC - Hanoi - NodeJS - ArrowJS - 27-11 - 2015ITLC - Hanoi - NodeJS - ArrowJS - 27-11 - 2015
ITLC - Hanoi - NodeJS - ArrowJS - 27-11 - 2015
 
Trung tâm đào tạo
Trung tâm đào tạoTrung tâm đào tạo
Trung tâm đào tạo
 
Arrowjs.io
Arrowjs.ioArrowjs.io
Arrowjs.io
 
Dien toan dam may nguon mo - Ung dung trung tam du lieu Da Nang
Dien toan dam may nguon mo - Ung dung trung tam du lieu Da NangDien toan dam may nguon mo - Ung dung trung tam du lieu Da Nang
Dien toan dam may nguon mo - Ung dung trung tam du lieu Da Nang
 
Dien toan dam may nguon mo - ung dung o trung tam du lieu da nang
Dien toan dam may nguon mo - ung dung o trung tam du lieu da nangDien toan dam may nguon mo - ung dung o trung tam du lieu da nang
Dien toan dam may nguon mo - ung dung o trung tam du lieu da nang
 
Web application-security
Web application-securityWeb application-security
Web application-security
 
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
 
SFD2013 OpenStack ứng dụng tại Trung tâm dữ liệu Đà Nẵng
SFD2013 OpenStack ứng dụng tại Trung tâm dữ liệu Đà NẵngSFD2013 OpenStack ứng dụng tại Trung tâm dữ liệu Đà Nẵng
SFD2013 OpenStack ứng dụng tại Trung tâm dữ liệu Đà Nẵng
 

Web service security