Assignment - 5
Assignment - 5
1) What is HSTS ?
The initial request made via HTTP is not protected by TLS and can be an attack vector.
Potential attack
The client is unaware about the man in the middle, and will assume that they have sent a
http response and received a http response. They will enter the credentials which the
attacker can access.
This is known as an SSL stripping attack.
This problem is solved by HSTS.
HSTS
When a user first visits a website, the server sends an HSTS header in the response. This
only allow secure HTTPS connections for that particular domain.
It prevents any downgrade to HTTP, even if an attacker tries to force it.
Forces encrypted connections and protects from misconfigured links or user mistakes.
DEMONSTRATION
2) In Developer tools of browser, what does each tab do? Network performance, memory
application security. 3) Where can you find the sensitive info here?
1. Elements Tab
2. Network Tab
Displays every HTTP request the page makes (e.g., API calls, image loads, scripts).
You can inspect headers, responses, request payloads, and timing.
Sensitive information like authentication tokens (example JWTs in headers or cookies),
API keys, Personally identifiable information (PII) in request/response bodies, URLs
revealing sensitive endpoints can be found.
3. Console Tab
Shows JavaScript logs, errors, warnings, and lets you run JS manually.
Devs often log variables here for debugging.
Possible sensitive information — devs might accidentally console.log() sensitive data
like user info or tokens.
4. Sources Tab
Lets you explore all loaded JavaScript, CSS, and other source files.
You can place breakpoints and debug code line-by-line.
Possible sensitive information — hardcoded secrets or configuration data could be
visible in JS files.
5. Performance Tab
6. Memory Tab
7. Application Tab
Shows local storage, session storage, cookies, IndexedDB, service workers, etc.
Sensitive information like, JWTs, session tokens, user preferences, cached sensitive data
can be found.
8. Security Tab
HTTP headers are key-value pairs sent between the client and server with an HTTP request or
response. They provide important information about the request or response, such as
content type, authentication, caching behavior, and more.
Example: Response headers returned by the Juice Shop server for a GET request to
http://localhost:3000
5) What is Google Dorking? Tools used.
Google Dorking is the use of advanced search operators in Google to uncover hidden,
sensitive, or misconfigured information on websites. It uses Google's indexing (via
crawlers/spiders) to find data that isn't easily accessible through normal browsing.
DorkSearch
Automates the process of running multiple dorks to find exposed info - used by pen-testers
and hackers.
6) Work on business logic labs on port swigger and owasp juice shop.
Androgoat in genymotion:
The Capital One data breach was one of the largest data breaches in banking history,
affecting over 100 million customers in the U.S. and Canada.
Capital One hosted their data in AWS S3 buckets.
Their firewall was improperly configured, allowing SSRF (Server-Side Request Forgery)
attacks.
Thompson used SSRF to trick AWS metadata service into giving her credentials (IAM role
tokens).
The IAM role she obtained had too many privileges, giving her access to sensitive
customer data stored in AWS S3.
She downloaded about 100 million customer records.
She uploaded parts of the stolen data to her personal GitHub repository, allowing a
cybersecurity researcher to find and report it.