Web App Security Presentation by Ryan Holland - 05-31-2017
The document discusses web application security, highlighting the increasing threats and vulnerabilities faced by web apps, particularly in cloud environments. It emphasizes the need for better coding practices, continuous monitoring, and a structured security management approach, including patch management and access control strategies. Additionally, it outlines various hacking methodologies and advocates for integrating security measures throughout the software development lifecycle.
Vulnerabilities
+ Change
+ Shortage
Complexityof defending web applications and workloads
Risks are moving up the stack
1. Wide range of attacks at every
layer of the stack
2. Rapidly changing codebase can
introduces unknown vulnerabilities
3. Long tail of exposures inherited
from 3rd party development tools
4. Extreme shortage of cloud and
application security expertise
Web App
Attacks
OWASP
Top 10
Platform /
Library
Attacks
System /
Network
Attacks
Perimeter & end-point security tools
fail to protect cloud attack surface
Web Apps
Server-side Apps
App Frameworks
Dev Platforms
Server OS
Hypervisor
Databases
Networking
Cloud Management
7.
Web Application Security
WebApps
Server-side Apps
App Frameworks
Dev Platforms
Server OS
Hypervisor
Databases
Networking
Cloud Management
8.
Web Application VulnerabilityExample
CVE-1999-0278 â in IIS, remote attackers can obtain
source code for ASP files by appending â::$DATAâ to the
URL
Patch MS98-003
Web Apps
Server-side Apps
App Frameworks
Dev Platforms
Server OS
Hypervisor
Databases
Networking
Cloud Management
Poor Coding Practices
âąUnsanitized Data
- User controlled input
- Web forms
- URL query exposure
âą Whitelisting
- Control expected user input
- Accept known, expected data
âą Meta-Character Sanitization
- Quotes break up a query
- Names with quotes should be the
exception
Web Apps
Server-side Apps
App Frameworks
Dev Platforms
Server OS
Hypervisor
Databases
Networking
Cloud Management
11.
Old Reliable Codeand Processes
âą Lack of Code Cleanup
- Failed old code
- Decommissioned backend systems
- Account credentials
- Backup systems
- Discovery of application topology (API and static links)
- Unnecessary comments and notes
12.
Unpatched and UnsupportedCode
âą CMS versions are updated
- Vulnerable plug-ins and themes remain
o Still function
o No error codes
o CMS application doesnât check
âą TimThumb Word Press Plug-in
- Library used to resize larger images
- 39 million operational
- Author announced end of support
- Plug-in hacked
13.
Lack of SecurityOversight
âą Security is not longer just advisory
âą Inject Security into the SDLC
âą Inject Requirements
âą Make sure the Technologies are
Secure
âą Automatically and Manually review
all code during multiple points
throughout the development
process
âą Test, Test, Test
âą Continuous monitoring and
scanning
Hacker Recon Methods
CrawlingTarget Website
Mass Vulnerability Crawl
Open Forums
Dark Web
Web Apps
Server-side Apps
App Frameworks
Dev Platforms
Server OS
Hypervisor
Databases
Networking
Cloud Management
16.
Crawling Target Website
âąManual
- Browse the website as a normal user
- Gather email addresses, related domains and domain info
- Web application code language
o Revision
o Plug-ins
- Web server OS
- User input pages
- Directory structure
- Backend systems
âą Software tools
- Find hidden forms, software version, js files, links and comments
17.
Mass Vulnerability Crawl- Example
âą Google Dorking â (aka Google hacking) Uses the search engine to find
difficult information using complex, detailed search queries
- Plug in search string to find vulnerable websites
- Some have preset search strings
- Search results are dynamic
- Timing is everything
o Target system could be patched
o Other hackers got there first
Open Forums
âą Vulnerabilitiesreported to vendors
- Vendors should
o Acknowledge vulnerability
o Provide timeline to fix
o Announce vulnerability to the public
o Provide fix/patch or work-around
o Within a reasonable timeframe
- Some Vendors
o Delay response to reports
o Donât provide a patch
o Announce vulnerability only to customers
o Bury patches with other âupgradesâ
20.
Open Forums
âą Informationsharing
- Researchers post vulnerabilities
o Lack of response from the vendor
o Bypass vendor completely
- Public service to Internet community
o On-going debate
âą Bypass the vendors and post vulnerabilities
âą Involve the vendor first
o What is a reasonable amount of time
âą Some say it should be 24 hours or less
âą Some agree to wait 4-6 weeks
âą Others somewhere in between
Open forums facilitate vendor due diligence
21.
Open Forums -Examples
âą Exploit Database - www.exploit-db.com
- A non-profit project that provides a public service to share information
about vulnerabilities and is run by Offensive Security
âą Full Disclosure - http://seclists.org/fulldisclosure/
- A public, vendor-neutral forum of vulnerabilities, exploitation techniques
and other events of interest to the community
âą Cryptome - https://cryptome.org/
- Collects information about freedom of expression, privacy, cryptology,
dual-use technologies, national security, intelligence, and government
secrecy
22.
Open Forums -Example
âą Vulnerability details
- Date reported
- Type of vulnerability
- Platform impacted
- Author (not shown)
- Verification (time permitting)
- Link to infected application (some)
23.
Dark Web
âą Encryptednetwork
âą Restricted access between Tor servers and clients
âą Collection of DBs and communication channels
âą Hidden from conventional search engines
âą Shares some features with Open Forums
âą Tor browser required
âą More advanced resources and tools
Attack Methodology
âą Attackof opportunity
- Hacker finds vulnerability within skillset
- Target system and organization irrelevant
âą Targeted attack
- Specific to people or organization
- System resources
âą Low cost of entry
- Open list of vulnerabilities
- Targets easy to find
- Hackerâs skill-set varies
27.
Attacks of Opportunity
âąVulnerability Database Monitoring
âą Block Network Vulnerability Scanning
âą Google Dorking
âą Shodan
âą Application Vulnerability Scan
28.
Targeted Attacks
âą ScanningIP Internet Assets
âą Application/Network Vulnerability Scan
âą Careers Page
âą Research Technologies
âą Social Media Profiling
âą Phishing Email
âą Escalate Privileges
âą Maintain Access
âą Exfiltration of Data
From Web Appsto Privileged Access
âą How hacking a web app can lead to system compromise
- Code analysis
o Review of code to reveal unintended system information
- System scanning
o Other software could have vulnerabilities
- Session Hijacking
o Exploiting a current, valid session
- Social Engineering
o Deception used to manipulate behavior
31.
From Web Appsto Privileged Access
âą Code analysis
- Account information
o Usernames and passwords
o Plain text or hashed
- Software tools
o Web search
o Scan to identify
âą Usernames & passwords
o Brute force to crack encryption
o Throttle tools to avoid detection
o Offline may be an option
32.
From Web Appsto Privileged Access
âą Session Hijacking
- Obfuscated code
o Embedded in images
o Mouse-over techniques
- Proxy replay
- Malicious binary
- Session cookies
- Java script injection
- Cross-site scripting
- Routine system maintenance
- Bind shell
Create Access ManagementPolicies
âą Identify data infrastructure that requires access
âą Define roles and responsibilities
âą Simplify access controls
âą Key Management System (KMS)
âą Continually audit access
âą Start with a least privilege access model
Security Management andMonitoring Strategy
âą Monitoring for malicious activity
âą Scanning Services
âą Forensic investigations
âą Compliance needs
âą System performance
âą All sources of log data is collected
âą CloudTrail â Use it, Love it.
âą WAF
âą Correlation logic
âą IAM behavior
âą IDS Network traffic
âą FIM Logs
âą Focused security research
âą Security content creation
âą Review process
âą Live monitoring
37.
Adopt a PatchManagement Approach
âą Constantly scan all production systems
âą Compare reported vulnerabilities to production
infrastructure
âą Classify the risk based on vulnerability and
likelihood
âą Test patches before you release into production
âą Setup a regular patching schedule
âą Keep informed, follow bugtraqer
âą AMI and Golden Images
âą Reference Architecture, Formation Templates
38.
Secure Your Code
âąTest inputs that are open to the Internet
âą Add delays to your code to confuse bots
âą Use encryption when you can
âą Test libraries
âą Scan plugins
âą Scan your code after every update
âą Limit privileges
âą DevSecOps
39.
DevSecOps Release PipelineDesign
âą Cloud Insight is a purpose built SaaS platform providing vulnerability
assessment for AWS customers.
âą Jinkins and AWS services are used for deployment pipeline.
âą Micro-services architecture with several development teams.
âą Multiple deployments a week.
âą Fully automated deployment pipeline.
âą Deployment pipeline consists of 4 environments
âą Development
âą Integration
âą Staging
âą Production
âą Requirement that vulnerabilities are identified and remediated before
changes push to production.
âą Cloud Insight will scan all instances running in Integration every 24
hours.
40.
How to ImplementedScanning in the Pipeline
âą Scanning a large number of instances takes
time âwant to avoid slowing down releases.
âą Workflow for Staging environment queries
vulnerability data from scans in Integration.
âą Vulnerabilities tracked by AMI, not instance IDs.
âą Scan reports are attached to RFCs and stored
in S3.
âą Any vulnerability of CVSS > 4.0 triggers a
rollback.
- Scan report with remediation steps are attached to
the report
41.
Follow our Research& Stay Informed on the Latest Vulnerabilities
Blog
https://www.alertlogtic.com/resources/blog
Newsletter
https://www.alertlogic.com/weekly-threat-report/
Cloud Security Report
https://www.alertlogic.com/resources/cloud-security-report/
Zero Day Magazine
https://www.alertlogic.com/zerodaymagazine/
Twitter
@AlertLogic
Websites to follow
âą http://www.securityfocus.com
âą http://www.exploit-db.com
âą http://seclists.org/fulldisclosure/
âą http://www.securitybloggersnetwork.com/
âą http://cve.mitre.org/
âą http://nvd.nist.gov/