WEB APP Flashcards
What is the difference between a web server and a Dynamic type of server?
Web server just serves out static content, whereas dynamic content can reference a back end data store and server active content; most modern web applications are considered dynamic servers, running content
What is an application server?
A server referenced by the web/dynamic server that executes code; things like Websphere, JBOSS, Weblogic, etc.
What was improved from HTTP 1.0 to 1.1?
caching support, extensions, bandiwth optimization, host header field
What is “push promise” ?
A feature of HTTP 2, it allows a web server to send content before the client has requested it. Like a predictive version of AJAX.
What is http multiplexing?
A feature of HTTP 2, it allows a server to request multiple sockets at once to requests resources in parallel, rather than “pipelining” it all through the same connection.
What moves HTTP to a text-based-on-the-wire type of connection to a binary form?
HTTP 2.0, which gives it better compression and reduces overhead/complexity
What string in an http request identifies the type of client software used to connect?
User-agent string. Describes the web client.
Where is the web server technology identified in an HTTP request?
the “server” field
What is Windows 7/2008 listed as in the user-agent string? Windows 8/2012?
NT 6.1 and NT 6.3
What is the difference between GET and POST?
Both request data from server, but GET uses the URL to pass parameters, POST uses the payload
Why is POST more secure than GET?
Parameters aren’t written to web server or proxy logs
What echoes an HTTP request as seen by the server back to a client, for diagnostics?
TRACE
What HTTP request asks the server to return the list of request methods it supports? (which can then be used for interchange)
OPTIONS
Method used when accessing the an application through a proxy server.
CONNECT
How does a CONNECT request work?
The client connects to the proxy, and the CONNECT request tells the server where to go to connect to the resource
What HTTP method is used for WebDAV attacks, and where are those type of systems usually found?
PUT, which lets you upload data to a resource that you specify. Found on intranet web servers, occasionally.
“Switching Protocols” HTTP status code
101 (info)
“redirect” HTTP status code
302
“Not modified” HTTP status code, and what is it for?
304; used to say that the content hasn’t changed, so the client can continue to use data that has been cached.
“Unauthorized” to access http status code (use authentication to access this)
401
Page not found HTTP status code
404
Server error HTTP status code series
5xx
Websockets were integrated with the __________ technology scheme
HTML5
This protocol establishes a bi-directional comm pipe over a SINGLE tcp socket
websocket
How is a websocket established? How does it work?
A socket is established using JS/HTML5 code; a 101 (switching protocols) request is passed, and then requests are handled with the ws:// or wss:// protocol. Typically used with a .js file, but can be found insie an HTML page itself with
What is method interchange?
When you are able to use a GET in lieu of a POST, etc.
_______ authentication uses a base64 encoding when passed over the network, and uses a “real” to identify itself.
Basic
How does basic authentication handle the actual process of authenticating?
The web server handles it. IIS uses local accounts, apache uses .htaccess
What are some problems with basic authentication? (Things an attacker will look for)
- No account lockout/max attempts
- Auth traffic passed in clear
- Can easily be replayed
- No log out functionality w/o closing browser
What is added to basic auth to to improve it in digest auth?
A nonce is added as a salt to the the md5 hashing off the password
Why is digest auth not much more secure than basic?
The nonce (used as a salt in the md5 hashing of the password) is passed in the clear, making it vulnerable to man in the middle attacks
Integrated windows auth is perfect for ______ types of attacks
XSS/CSRF; if you can take over a client browser, you can get access to the web server
Typically, the authentication in “forms based” auth is handled by
LDAP or a backend database; the user requests the form, fills out the form, and submits it; the application (not the underlying web server) processes the request and either sends an error or returns the resource.
Attack vectors (issues) for forms based auth
- Developer responsible for implementing proper security controls
- Possible to sniff/intercept tokens/cookies/sessions
- Possible to spoof the site (create a phishing attack)
Three parties for an Oauth transaction
User (@user)
Consumer (Tweetbot)
Service provider (Twitter)
Three items exchanged as part of an OAuth transaction
- Request token
- Secret
- Access token
The secret is used to sign the request, which then goes back to the service provider. An access token is generated and given back to the service provider, which is used to post the data.
Hackers look for what in OAuth
- Want to find the secret key (due to insecure storage or interception)
- Highly dependent on consumer service to get the implementation right/regenerate key properly
- Possible to spoof the sight, steal the username/password
Difference between OAuth 1.0 and 2.0
- SSL required for all 2.0 communications
- Signatures not required for API calls once token is generated in 2.0
- Tokens in 2.0 expire
- Less data generated in 2.0
SSL/TLS relies on _________ for encryption, which relies on trust with a ____________
PKI, certificate store
When a browser requests an HTTPS page, it receives ______________.
The servers public key
Heartbleed is a vulnerability in ________ and allows for the attacker to _____________.
SSL; read 64k chunks of memory and things resident there. (Username, passwords, server private key)
Nmap script to check heartbleed
ssl-heartbleed.nse
Five parts of the Sans reporting format
Exec summary Introduction Methodology Findings Conclusions (optional: Presentation)
Stages of the Sans Web app pen test methodology
Recon
Mapping
Discovery
Exploitation
What is included with WHOIS record?
Identifies owner Authoritative name servers Email addresses Phone numbers Names of tech POCs
What does DIG output that NSLOOKUP does not?
Specific types of DNS records (MX, AXFR (zone xfr) ANY)
What is the fierce scanner for?
Designed to find hosts on a domain, using DNS queries. Will guess host names using a wordlist
What does DNSrecon do?
Collects all of the standard records it can find from the domain, including SRV records (that can point to other attack vectors)
Reverse lookup for a range of IP addresses
To omit a page or pages with specific strings from a google search
Use the “-“ key (site:www.sans.org -handlers)
The google dorks (Google Hacking DB) is a repository of __________ and is found at _________.
Very specific searches, such as those finding webcams with default credentials and indexes/stock password pages.
It can be found at exploitdb
Operators used in Shodan for finding things:
Finds devices based on city, country, lat/long, IP, hostname, operating system
What is the “Google dorks” of Shodan? (The site where you can find legit uses of Shodan)
SHINE (www.infracritical.com) Finds things like: Medical devices Traffic lights Serial port servers Data radios Webcams/CCTVS
Tool that will search all the documents it can find on a site for METADATA (thinks like users, folders, printers, type of software, etc)
FOCA (Fingerprinting Orgs with Collected Archives)
Tool that gathers information about domains via PUBLIC information sources (IP addresses, emails, hosts, etc)
The Harvester