This document provides an overview of server-side request forgery (SSRF) vulnerabilities. It defines SSRF as allowing an attacker to induce a server to make HTTP requests to domains of the attacker's choosing. The document covers the types of SSRF (basic and blind), impact (exposing internal systems or remote code execution), methods for finding SSRF vulnerabilities, exploitation techniques like bypassing filters, and mitigations like using whitelists instead of blacklists. Tools for finding and exploiting SSRF vulnerabilities are also listed.
This document provides an overview of server-side request forgery (SSRF) vulnerabilities. It defines SSRF as allowing an attacker to induce a server to make HTTP requests to domains of the attacker's choosing. The document covers the types of SSRF (basic and blind), impact (exposing internal systems or remote code execution), methods for finding SSRF vulnerabilities, exploitation techniques like bypassing filters, and mitigations like using whitelists instead of blacklists. Tools for finding and exploiting SSRF vulnerabilities are also listed.
1. XSS:
Stored-XSS
Reflected-XSS
2. SQL injection
Dạng tấn công vượt qua kiểm tra đăng nhập
Dạng tấn công sử dụng câu lệnh SELECT
Dạng tấn công sử dụng câu lệnh INSERT
Dạng tấn công sử dụng stored-procedures
Rest API Security - A quick understanding of Rest API SecurityMohammed Fazuluddin
This document discusses REST API security methods. It provides an overview of authentication and authorization and describes common security methods like cookie-based authentication, token-based authentication, OAuth, OpenID, and SAML. It then compares OAuth2, OpenID, and SAML and discusses best practices for securing REST APIs like protecting HTTP methods, validating URLs, using security headers, and encoding JSON input.
DerbyCon 7 - Hacking VDI, Recon and Attack MethodsPatrick Coble
This was a session on September 23, 2017 at DerbyCon 7.
VDI Deployments are in over 90% of all the Fortune 1000 companies and are used in almost all industry verticals, but are they secure? The goal of most VDI deployments is to centrally deliver applications and/or desktops to users internally and externally, but in many cases their basic security recommendations haven’t fully deployed, allowing an attacker to gain access. This talk will review the basic design of the top two solution providers, Citrix and VMware. We will go over these solutions strengths and weaknesses and learn how to quickly identify server roles and pivot. We will also examine all the major attack points and their defensive counters. If you or if you have a client that has a VDI Deployment you don’t want to miss this talk.
Patrick Coble is an independent EUC and Security Consultant working around Nashville, TN. Patrick has worked in IT for 18 years and as a consultant for over 9 years. He is a recognized expert in Virtualization, EUC solutions and Security. He has deployed hundreds of VDI deployments using both Citrix and VMware solutions all over the southeast. Patrick is working to expose and close the gaps in VDI solutions when it comes to security. He helps with Red and Blue teams to gain access and secure VDI deployments.
SQL injection is a technique where malicious users can inject SQL commands into a web page input to alter SQL statements and compromise security. Attackers can exploit SQL injection flaws using techniques like the union operator to combine queries, boolean logic to verify conditions, error-based attacks to retrieve information, and time delays to conditionally delay responses. Proper sanitization of user input is needed to prevent stored procedure injection and protect websites from SQL injection attacks.
Download luận văn đồ án tốt nghiệp với đề tài: Nghiên cứu Hệ thống Honeypots và Honeynet nhằm nghiên cứu một số kỹ thuật tấn công dịch vụ Web, cho các bạn tham khảo
This document provides an overview of server-side request forgery (SSRF) vulnerabilities, including what SSRF is, its impact, common attacks, bypassing filters, and mitigations. SSRF allows an attacker to induce the application to make requests to internal or external servers from the server side, bypassing access controls. This can enable attacks on the server itself or other backend systems and escalate privileges. The document discusses techniques for exploiting trust relationships and bypassing blacklists/whitelists to perform SSRF attacks. It also covers blind SSRF and ways to detect them using out-of-band techniques. Mitigations include avoiding user input that can trigger server requests, sanitizing input, whitelist
Web-application-security dành cho sinh viên IT gồm Web application attack and defense thông qua thống kê nền tảng website phổi biến, lỗ hổng web, phát hiện, kiểm tra lỗ hổng, tại sao dùng web application firewall? Tại sao triển khai WAF trên Reverse Proxy? Modsecurity
Bài 7: Xác thực và quản lý tài khoản - Giáo trình FPTMasterCode.vn
Mô tả ba kiểu xác thực thông tin
Giải thích những gì mà mô hình đăng nhập đơn nhất có
thể thực hiện
3
Liệt kê các thủ tục quản lý tài khoản để bảo mật mật
khẩu
Định nghĩa các hệ điều hành được tin cậy
1. XSS:
Stored-XSS
Reflected-XSS
2. SQL injection
Dạng tấn công vượt qua kiểm tra đăng nhập
Dạng tấn công sử dụng câu lệnh SELECT
Dạng tấn công sử dụng câu lệnh INSERT
Dạng tấn công sử dụng stored-procedures
Rest API Security - A quick understanding of Rest API SecurityMohammed Fazuluddin
This document discusses REST API security methods. It provides an overview of authentication and authorization and describes common security methods like cookie-based authentication, token-based authentication, OAuth, OpenID, and SAML. It then compares OAuth2, OpenID, and SAML and discusses best practices for securing REST APIs like protecting HTTP methods, validating URLs, using security headers, and encoding JSON input.
DerbyCon 7 - Hacking VDI, Recon and Attack MethodsPatrick Coble
This was a session on September 23, 2017 at DerbyCon 7.
VDI Deployments are in over 90% of all the Fortune 1000 companies and are used in almost all industry verticals, but are they secure? The goal of most VDI deployments is to centrally deliver applications and/or desktops to users internally and externally, but in many cases their basic security recommendations haven’t fully deployed, allowing an attacker to gain access. This talk will review the basic design of the top two solution providers, Citrix and VMware. We will go over these solutions strengths and weaknesses and learn how to quickly identify server roles and pivot. We will also examine all the major attack points and their defensive counters. If you or if you have a client that has a VDI Deployment you don’t want to miss this talk.
Patrick Coble is an independent EUC and Security Consultant working around Nashville, TN. Patrick has worked in IT for 18 years and as a consultant for over 9 years. He is a recognized expert in Virtualization, EUC solutions and Security. He has deployed hundreds of VDI deployments using both Citrix and VMware solutions all over the southeast. Patrick is working to expose and close the gaps in VDI solutions when it comes to security. He helps with Red and Blue teams to gain access and secure VDI deployments.
SQL injection is a technique where malicious users can inject SQL commands into a web page input to alter SQL statements and compromise security. Attackers can exploit SQL injection flaws using techniques like the union operator to combine queries, boolean logic to verify conditions, error-based attacks to retrieve information, and time delays to conditionally delay responses. Proper sanitization of user input is needed to prevent stored procedure injection and protect websites from SQL injection attacks.
Download luận văn đồ án tốt nghiệp với đề tài: Nghiên cứu Hệ thống Honeypots và Honeynet nhằm nghiên cứu một số kỹ thuật tấn công dịch vụ Web, cho các bạn tham khảo
This document provides an overview of server-side request forgery (SSRF) vulnerabilities, including what SSRF is, its impact, common attacks, bypassing filters, and mitigations. SSRF allows an attacker to induce the application to make requests to internal or external servers from the server side, bypassing access controls. This can enable attacks on the server itself or other backend systems and escalate privileges. The document discusses techniques for exploiting trust relationships and bypassing blacklists/whitelists to perform SSRF attacks. It also covers blind SSRF and ways to detect them using out-of-band techniques. Mitigations include avoiding user input that can trigger server requests, sanitizing input, whitelist
Web-application-security dành cho sinh viên IT gồm Web application attack and defense thông qua thống kê nền tảng website phổi biến, lỗ hổng web, phát hiện, kiểm tra lỗ hổng, tại sao dùng web application firewall? Tại sao triển khai WAF trên Reverse Proxy? Modsecurity
Bài 7: Xác thực và quản lý tài khoản - Giáo trình FPTMasterCode.vn
Mô tả ba kiểu xác thực thông tin
Giải thích những gì mà mô hình đăng nhập đơn nhất có
thể thực hiện
3
Liệt kê các thủ tục quản lý tài khoản để bảo mật mật
khẩu
Định nghĩa các hệ điều hành được tin cậy
Bài 4: Bảo mật máy chủ, ứng dụng, dữ liệu và mạng - Giáo trình FPTMasterCode.vn
Liệt kê các bước để bảo mật cho máy chủ
Định nghĩa bảo mật cho ứng dụng
Giải thích phương thức bảo mật cho dữ liệu bằng cách ngăn chặn thất
thoát dữ liệu (DLP)
Bài 4-Bảo mật máy chủ, ứng dụng, dữ liệu và mạng 3
Giải thích phương thức bảo mật cho dữ liệu bằng cách ngăn chặn thất
thoát dữ liệu (DLP)
Liệt kê các loại thiết bị bảo mật mạng khác nhau và giải thích cách sử
dụng những thiết bị đó
Định nghĩa quá trình chuyển đổi địa chỉ và điều khiển truy cập mạng
Giải thích phương thức tăng cường bảo mật thông qua thiết kế mạng
8. Tại sao phải bảo mật ứng dụng Web
• Web Application là mục tiêu số 1 của các hacker
75% các cuộc tấn công nhằm vào tầng Application (Gartner)
• Hầu hết các Web Application đều có lỗ hổng
95% Web Application có lỗ hổng (Imperva)
78% Web App có lỗ hổng dễ khai thác (Sysmantec)
67% Web App bị lợi dụng để phát tán Malware (Sysmantec)
10. Injection
• Nhân tố
Bất cứ ai, hệ thống nào có thể gửi dữ liệu không tin cậy vào hệ thống
• Khả năng tấn công
DỄ
• Độ phổ biến
Phổ biến
• Khả năng phát hiện
Trung bình
• Mức độ ảnh hưởng
Nghiêm Trọng: đánh cắp, phá hủy dữ liệu…
11. Injection (tiếp)
• Injection là?
Đánh lừa ứng dụng, nhằm tiêm một hay nhiều đoạn code, câu lệnh ngoài ý
muốn vào chương trình.
• Các loại Injection
SQL
LDAP
OS Command
Xpath
…
15. Injection: Cách phòng chống
• Hạn chế dùng command text
Nếu dùng thì nên dùng SqlParameter
• Sử dụng Stored Procedured
Lưu ý các trường hợp build query động trong stored
• Escape tất cả các dữ liệu đầu vào
• Phân quyền (user sql) mức thấp nhất có thể
• White list input validation
VD: Tên chỉ chấp nhận [A-Za-z ]
16. Broken authentication &
Session Management
• Các chức năng authentication, authorization được thi công không
đúng khiến attacker dễ dàng đánh cắp mất khẩu, quyền truy cập (tạm
thời hoặc vĩnh viễn)
19. Broken authentication &
Session Management
• HTTP là protocol không có trạng thái (stateless protocol)
Đơn giản chỉ có: HTTP request, HTTP response
Tất cả dữ liệu luôn được gửi qua HTTP Request
• Làm thế nào để lưu giữ trạng thái?
Client: cookies
Server: sessions
• Các ứng dụng thướng lưu trữ SessionID trong cookie, URL
Vấn đề: Mất SessionID là mất mật khẩu
• Nhiều cách để đánh cắp SessionID
packet sniffing – (Wifi công cộng)
HttpReferrer logs, if sessionId is in the URL
23. Broken authentication &
Session Management
• Sử dụng SSL!
Sniff Cookies (session ID) khó khắn hơn
Nếu không sử dụng SSL ở mọi nơi được thì hãy dùng ở form login
• Sử dụng httponly cookie
• Thiết lập timeout cho session, cookie
Hủy session khi logout
• Không sử dụng mode SessionID qua URL, mà dùng cookie
• Mã hóa cookie nếu cần thiết
• Không ghi session ID ra log.
• Kiểm tra password cũ khi đổi. Gửi email xác nhận tới email cũ nếu
đổi email
24. Cross-Site Scripting (XSS)
• Cho phép Attacker có thể thực thi một đoạn Script trên trình duyệt
của Victim. Để đánh cắp cookie (session id), thay đổi giao diện trang
web nhằm mục đích lừa đảo, dẫn người dùng đến trang web chứa
malware…
• Gần như website nào cũng có lỗ hổng này
25. Cross-Site Scripting (XSS)
• Stored XSS
Thông qua các tính năng cho phép nhập liệu không được validate attacker
nhập các đoạn mã và được lưu giữ vào chương trình.
• Reflected XSS
Tiêm mã thông qua URL
30. XSS – Cách phòng chống
• Tuyệt đối không bao giờ tin tưởng dữ liệu người dùng nhập vào
• “Escape” tất cả dữ liệu trước khi hiển thị ra
JavaScript parameters, URL parameters, STYLE elements
Remove script tags, and possibly anything with a SRC attribute
• Không dùng HTTP GET cho các request thay đổi dữ liệu
Không thì 1 thẻ IMG cũng có thể xóa nội dung trên web
• Sử dụng HttpOnly để bảo vệ cookie
• Built-in protection
ASP.NET Request Validation (ASP.NET 4.0)
AntiXSS library (ASP.NET 4.5)
• NWebSec
32. Insecure Direct Object Reference
• Tham khảo một ví dụ
http://www.company.com/employeeprofile.aspx?id=emp1
Tính năng xem và chỉnh sửa thông tin cá nhân của mỗi nhân viên
Lập trình viên không dùng ID của user hiện tại mà lại lấy qua URL
=> Employe 1 có thể xem
http://www.company.com/employeeprofile.aspx?id=emp2
• Phân quyền chỉ ẩn menu chức năng, nhưng khi truy cập bằng đường
dẫn vẫn vào được.
33. Insecure Direct Object Reference
Cách phòng chống
• Chỉ phân quyền, hạn chế ở Front-end là chưa đủ
• Tất cả các tài nguyên phải được chỉ định mức độ an ninh và được
kiểm tra quyền
• Lưu ý các API lấy dữ liệu rất dễ bị lãng quên check quyền.
34. Security Misconfiguration
• Bảo mật tốt là ta phải bảo mật ở tất cả các tầng
Application (Source Code)
Application Server (OS)
Web Server
Database server
…
• Thông thường thiết lập mặc định của các tầng, ứng dụng thường kém bảo
mật
Default password
FTP Anonymous
Directory listing
Error page
Permission
MIME Type
Unused port open
35. Security Misconfiguration
• Đọc kỹ tài liệu hướng dẫn của các phần mềm khi triển khai
• Chịu có theo dõi các tạp chí, blog công nghệ để cập nhật các thông tin
về bảo mật
• Dùng phần mềm quét hệ thống
Microsoft Baseline Security Anlyzer …
• Disable tất cả các port không dùng
• Disable, đổi password mặc định
• Không show báo lỗi chi tiết đến người dùng cuối
Custom Errorpage
36. Sử dụng phần mềm, component có lỗ
hổng
• Luôn cập nhật bản mới nhất có thể
• Theo dõi website của hãng để có thông tin về lỗ hổng, bản vá sớm
nhất
• Không sử dụng phần mềm crack, hay dùng phần mềm không rõ
nguồn gốc trên server.
37. Upload
• Attacker có thể upload 1 trang mã nguồn (aspx, php), virus, backdoor
lên server, dựa vào tính năng upload không validate.
• Lỗ hổng này rất nghiêm trọng, Attacker có thể chiếm toàn quyền
kiểm soát server thông qua lỗ hổng này
• Developer mới nào code tính năng upload hầu như cũng mắc phải lổ
hổng này.
39. Upload – Cách phòng chống
Validate ui chưa đủ
Kiểm tra header file
Không dùng tên file truyền từ client lên
Validate đuôi file hợp lệ
Cài phần mềm virus lên server
Tính năng upload nên viết, kiểm nghiệm và đóng gói thành các thư viện
dùng chung.
40. Download
• Attacker có thể download các file nhạy cảm từ server
Các file config
Mã nguồn
• Developer mới nào code tính năng download hầu như cũng mắc phải
lổ hổng này.
42. Download – Cách phòng chống
• Không sử dụng filename truyền từ phía client
Nên sử dụng ID thông qua các bảng quản lý
• Nếu vẫn sử dụng thì remove hết các ký tự “..”
• Kiểm tra đuôi file, chỉ cho phép dowload những file có đuôi trong
danh sách được phép.
43. OWASP
• OWASP (Open Web Application Security Project) là 1 dự án mở về
bảo mật ứng dụng web, dự án là sự cố gắng chung của cộng đồng với
mục đích giúp các doanh nghiệp có thể phát triển, mua và bảo trì các
ứng dụng web một cách an toàn. OWASP cung cấp cho công đồng
nhiều nguồn “tài nguyên” khác nhau:
Công cụ và tiêu chuẩn về an toàn thông tin
Các bộ chuẩn về kiểm tra bảo mật ứng dụng, lập trình an toàn và kiểm
định mã nguồn
Các thư viện và tiêu chuẩn điều khiển an toàn thông tin
Các nghiên cứu mới nhất về bảo mật ứng dụng web
Các maillist uy tín về thông tin bảo mật
44. Một vài projects của OWASP
Zed Attack Proxy (ZAP)
Easy to use integrated penetration testing tool for finding
vulnerabilities in web applications
Security Shepherd
CBT application for web and mobile application security awareness
and education
Dependency Check
Utility that identifies project dependencies and checks if there are any
known, publicly disclosed, vulnerabilities
O-Saft
Tool to show information about SSL certificates and tests the SSL
connections for given list of ciphers and various configurations
Source: https://www.owasp.org
45. OWASP vs CWE/SANS
Both are like
different sides of the
same coin
PCI DSS points to
both as industry best
practices
Optimal: Be familiar
with both!
OWASP
Top 10
CWE/SANS
Top 25
Source: http://www.docstoc.com/docs/115032367/2010-CWESANS-Top-25-with-OWASP-Top-10-and-PCI-DSS-V2-Mapping
46. Các phần mềm sử dụng phát hiện
sớm lỗ hổng
• CAT.NET
• OWASP Dependency Check
• Burp suite
• Acunetix
• MBSA – Microsoft baseline security analyzer