1.3 -Given a scenario, analyze potential indicators associated with application attacks. Flashcards
Given a scenario, analyze potential indicators associated with application attacks.
Privilege escalation + mitigation
-perps explot sys. processes to gain higher level access
-gives them more capabilities
-by vuln, bug, design flaw,etc
mitigation
-patch vulns
-update antivirus/antimalware
-data execution prevention (only data in executable areas can run)
Cross-site scripting (XSS)
-web apps allow attacker to perform HTML injection which inserts their HTML code into a web page
-often exploit “reflected input”
-another technique is to store XSS code on remote web server (stored XSS)
-“persistent” b/c they stay on server even when perp isn’t there
-causes usr to conduct unauthorized access activities, expose confidential data > usr unaware of participation
Mitigation
-devs must perform “input validation”
-apps shouldn’t let user include
tag in a reflected input field
-determine type of input app will allow > validate input to ensure it matches pattern
Injections
-injects code into app > changes way it executes
-app should be able to handle input/output properly > allows processing of invalid data
-data types: HTML, SQL,XML,LDAP, etc
Injections - Structured query language (SQL)
-targets database
-modifies SQL requests
-code inserted in strings > passed to database server > server parses + executes code
Chapple 145-148
Weiss 39-40
Injections - Dynamic-link library (DLL)
-targets apps
-inserts malicious code into running processes
-injects DLL > app runs program + runs as part of target process
-proper input validation CAN’T PREVENT
-difficult to trace attack
-Win. uses protected process sys. > ensures only trusted code loads
Prevention
-secure coding practices
-keep sys. patched
-proper input validation
Injections - Lightweight Directory
Access Protocol (LDAP)
-targets directory servers
-modifies LDAP requests 2 manipulate app results
-malicious input applied to directory server
-unauthorized queries, granting of permissions, pswd changes, etc
- similar to SQL injection
Injections - Extensible Markup Language (XML)
-XML=rules 4 data transfer + storage
-targets apps
-manipulates app logic
-gains unauthorized access
-performs unauthorized activity
-modifies XML requests
Pointer/object dereference
-app attempts to access/modify portion of data that’s expected to be valid but is null (invalid/reference points to nothing)
Indicators
-crashes
-data corruption/unexpected data modification
-app errors/unexpected app behaviors
Prevention
-safe coding practices
-use of safe pointer libraries
-static code analysis
-dynamic analysis + testing
-mem. safety mechanisms
-reg. software updates
-sec. education
Directory traversal
-AKA path traversal, dot dot slash
-exploits insufficient input validation to access files/directories outside intended directory structure
-takes advantage of poorly written code
-can allow perp to view source code for sites public directories + files
-can lead to unauthorized access, disclosure of sensitive info, remote code execution
Indicators
-unexpected file access
-multiple/repeated reqs
-disrupted services
Prevention
-input validation
-whitelists
-sec. awareness training
-access ctrls
-web app firewalls
-reg. sys. audits
-system hardening
Buffer overflows
-perp manipulates program into placing more data into mem. than what’s allocated for programs use
-overwrite info in mem. with instructions that can be executed by a dif. process running on sys.
-enabled perp to execute code outside specific app
-tends to persist 4 many yrs after it’s initially discovered
-takes time
-perp can obtain special privileges.
-usr gaining privileges wthout authentication
Impact
-disruption of service + lost data
-crashes + failures
-DoS
Prevention
-quality assurance
-secure programming practices
-software updates/patches
-monitor web 4 new vuln.
-devs need to perform bounds checking
Race conditions, indicators, prevention
-when code seq. compete over same resource/data concurrently
-can be bad if unplanned
-perp can exploit sys. processes to gain privilege escalation
-sec of code segment depends upon the sequence of events occurring within the system (Chapple 171)
Indicators
-malfunction
-DoS
-data corruption
-crashes/unpredictable app behavior
-null pointer errors (app gets pointer that it expects to be valid but is null which results in sys.crash)
-data integrity issues
Prevention
-synchronization mechanisms
-atomic ops
-transaction handling
-code reviews/testing
-use of thread safe libraries
TOCTOU
Time of check/time of use (race condition) AKA TOC/TOU
-takes advantage of time delay btwn checking something and usage of something
-sec. vulns. where sec. of sys. is dependant on timing of certain ops
-issues arises when condition is checked at one point in time but the state of system changes b4 corresponding op is performed
-window btwn creates opportunity 4 perp to manipulate/exploit resource in unexpected way
-race condition that occurs when program checks access permissions too far in advance of a resource request (Chapple 172)
Indicators
-inconsistent resources states
-data corruption/integrity issues
-unpredictable app behavior
-unauthorized access
Prevention
-minimize time gap btwn chcek and use phases (to reduce window of opportunity 4 perp)
-atomic ops
-file locking
-time of use checks
-access ctrls
-consistent state management
-secure coding practices
-dev should evaluate access permissions at the time of each request rather than caching a listing of permissions (Chapple 172)
Error handling
-the way sys. responds to unexpected events, errors, conditions
-proper error handling = crucial 4 maintaining sec + stability of sys.
Indicators
-error msgs revealing sensitive info
-app crashes
-incorrectly handled inputs
Prevention
-customized error msgs
-input validation
-graceful degradation
-logging + monitoring
-user education
-secure coding practices
-regular sec. audits
Improper input handling
-sys. doesn’t adequately validate, sanitize, or handle usr inputs
-can open door to attacks (injection, buffer overflows, etc)
Indicators
-injection attacks
-unexpected app behavior
-data corruption/manipulation
-error msgs wth sensitive info
Prevention
-input validation
-parameterized queries
-secure coding practices
-use of web app firewalls
-regular sec. audits
-check everything
Replay attack
-perp takes advantage of info transmitted over net. > info can help perp replay data 2 appear as someone else
-packets captured using sniffers > info extracted > packets placed back on net.
-need access to raw data (EX: net. tap, ARP poisoning, malware on vics comp.)
Protection
-> secure protocols (EX: IPsec = prevents replays of data traffic + provides authentication/encryption
-> avoid with SALT > use session ID wth pswd hash > creates unique authentication hash each time
-timestamp associated wth packets OR time valued, non repeating #s