owasp - Google Docs
owasp - Google Docs
ain Goal:
M
-- The main goal of owasp is to educate and raise awareness about web
application security(improving the security of software applications(Secure
from hackers))
ore Principles:
C
-- All of their materials be freely available and easily accessible on their
website(It includes documentation, tools, videos & Methodologies to
pentest)
-- making it easy possible for anyone to improving their own web
application security
WASP Chapters:
O
-- Every country conducts meetings at least once in a month – worldwide
India – Hyderabad, Chennai, Mumbai, Pune & Bengaluru(Most Famous)
How to Test :
esting web application security is crucial to identify and mitigate
T
potential vulnerabilities and protect against potential threats.
There are various tools available that can assist in testing web
application security. Some tools are OWASP ZAP, Burp Suite, Nessus,
Acunetix etc...
Here, I'm using the BURP SUITE tool for testing web application
security.
Why we choose Burp Suite Tool only:
It depends on various factors including the requirements of the testing,
The expertise of the tester, the specific features needed, and personal
preferences.
Here are some reasons why burp suite is commonly used web
application security testing
Burp Suite:
Burp suite is a widely used cyber security testing tool for web
application security purposes. It includes features like scanning, crawling
and advanced testing methods to identify security vulnerabilities.
It is widely used by security professionals, ethical hackers and
developers to identify, analyze and exploit security vulnerabilities in web
applications.
The tool is divided into various modules and features, each serving a
specific purpose in the web application security assessment process. Here
are some key components and features of Burp Suite.
1)Proxy: It allows users to intercept and inspectHTTP/S requests and
responses between the client and web application. It’s crucial for
understanding how the application functions and identifying potential
vulnerabilities.
2)Intercept:As the user interacts with the web application,the requests and
responses are intercepted by proxy. The proxy captures these interactions
before they reach the target web server and after the server responds
3)HTTP History:Typically refers to a record or logof HTTP requests and
responses that have been intercepted and captured during a testing or
browsing session.
4)Intruder:It is a module within burp suite thatis used to automate and
customize attacks against a web application.(Automate and customize
attacks on application inputs)
Example:
roken Access Control refers to a security vulnerability in a web
B
applicationorsystemwhereuserscangainunauthorizedaccesstocertain
resources, perform actions or assumerolesthattheyshouldnothavedue
to inadequate or improperly implemented access restrictions.
xample : Suppose we are having a web application for an online
E
marketplace with different user roles : Admin, Seller, Buyer
Scenarios :
)Admin Panel Oversight : The admin panel, intended only for
1
administrators to manage the website, is accessible to regular buyers
without propercontrols.(Aregularbuyer,bymanipulatingtheURLorusing
a browser extension, discovers they can access the admin panel and
modify product listings or user accounts.)
)Unauthorized Data Access : The system does not check user roles
2
when accessing sensitive data, leading to unauthorized access.(A seller,
without the proper authorization checks, can view or modify the other
seller’s product listings or gain access to buyers information.)
Authentication Authorization
What It Is he
T process of he
T process of
verifying the identity of granting or denying
a user, system or access rights and
entity. permissions to
authenticated users.
Goal o ensure that the
T o determine what
T
person or a system actions or resources a
trying to access user, system or entity
something is who they is allowed toaccessor
claim to be. perform.
Example ogging into an email
L fter logging into an
A
account by entering a email
username and account(Authentication
password ), authorization
determines whether
the user can read,
send or delete emails.
Insummary,authenticationisaboutverifyingidentity,whileauthorizationis
about granting or denying access based on that verified identity.
Authentication is like proving who you are, and authorization is deciding
what you’re allowed to do once your identity is confirmed.
)Privilege Escalation
1
2)Insecure Direct Object Reference
Privilege Escalation :
)Insecure Direct Object Reference : In a system there are various
2
objects(like files, database records oruserprofiles)andeachobjecthasa
reference or identifier. Insecure Direct Object Reference involves when
there’s a flaw in the system that allows a user to access or manipulate
objects they’re not supposed to by directly referring to them.
Insimplerterms,privilegeescalationislikefindingawaytogetmorepower
or access than you should have, and insecure direct object reference is
aboutexploitingflawstoaccessormanipulatethingsyouarenotsupposed
to within a system.
How to Attack:
Example:
Set Position:
Provide Payload:
Results:
Prevention Techniques :
Example:
Set Position:
Results:
rotection:
P
1)Use Strong Algorithms:Employ well established,standardized, and
strong cryptographic algorithms that are resistant to known attacks.
2)Regular updates & Patching:Stay updated with thelatest security
patches and updates for cryptographic libraries and tools to address any
identified vulnerabilities.
3)Key management best practices:Ensure secure keystorage and
distribution mechanisms. Rotate keys regularly to minimize exposure in
case of a compromise. Use proper key lengths and randomness for
generating keys.
4)Secure Implementation:Follow best practices andguidelines for
implementing cryptographic algorithms to minimize vulnerabilities.
5)Security Audit & Testing:Conduct thorough securityaudits and testing,
including penetration testing, code reviews to identify vulnerabilities and
weaknesses
)Monitor & Intrusion Detection:Implement monitoring and intrusion
6
detection systems to detect suspicious activities and potential attacks on
cryptographic systems.
7)Education & Training:Train developers & staff involvedin implementing
and managing cryptographic systems and about best practices, security
protocol & protection risks.
8)Backup & Redundancy:Implement backup & redundancymechanisms
to ensure availability and integrity of cryptographic keys and data.
9)Incident Response Plan:Develop a robust incidentresponse plan to
efficiency and effectively respond to any cryptographic failures or security
breaches.
10)Engage Experts & Consultants:Seek advice and assistancefrom
experts in cryptography and security to ensure the soundness of our
cryptographic implementations and systems.
3)Injection(2017-1, 2021-3):
Attackers send malicious data as part of a command or query to
manipulate the application and gain unauthorized access to the system’s
data or functions.
These are a type of security flaw that allows attackers to manipulate an
application's input to execute unintended commands or access
unauthorized data. This typically occurs in web applications where user
input is not properly validated or sanitized before being used in the
application
Types:
Example:
Set Position:
Provide Payload:
Results:
Protection:
)Input Validation & Sanitization:Validate & sanitizeall user input to
1
ensure it adheres to accepted formats and does not contain malicious
code.
2)Use Parameterized Queries:Use parameterized queriesor prepared
statements in database interactions to prevent SQL injection attacks
)Avoid Dynamic SQL Queries:Avoid constructive SQL queries
3
dynamically based on user input, as this can introduce vulnerabilities.
4)Least Privilege Principle:Limit the privileges andpermissions of
application components to the minimum necessary for their operation. This
reduces the potential damage that an attacker can cause
5)Escape Special Characters:Escape special charactersin user input
before using them in SQL Queries or HTML to prevent injection attacks
6)Content security policy:Implement CSP to mitigatethe risk of cross
site scripting attacks by specifying which sources of content are allowed to
be executed in the application.
7)Regular Security Audits & Code reviews:Conductregular security
audits and code reviews to identify and fix vulnerabilities, including injection
issues.
8)Web Application Firewalls:Utilize these to filterand block malicious
traffic, including attempts at injection attacks.
9)Education & Training:Train developers and userson secure coding
practices, highlighting the importance of input validation and protection
against injection attacks.
10)Security Headers:Implement security headers suchas
X-Content-Type-Options, X-Frame-Options, X-XSS-Protection to enhance
the security of our web application.
Insecure design is a vulnerability that occurs when the overall plan or
structure of a system or application has weaknesses or flaws that can be
exploited by attackers. It’s like having a building with a poorly thought-out
floor plan or weak foundation, making it easier for burglars to break in or for
the building to collapse.
- **Least Privilege:** Grant users only the permissions they need to perform
their tasks.
. **Enumeration and Scanning:** Attackers can use tools to scan for open
1
ports, services, and vulnerabilities in improperly configured systems.
. **Brute Force Attacks:** Default credentials or weak passwords can be
2
exploited through automated brute force attacks.
erialization, Deserialization
S
Hashkey
Ports
CORS
DOM
Encryption, Decryption
Git
)store
1
2)
it clone
G
Git branch
Git checkout branchname
Git status
Git add .
Git status
Git commit -m “”
Git branch
Git pull origin branchname
Git push origin branchname
Git log
Git merge
Git
it init
G
Git status
U - untracked
A - add
M - modify
it clone url
G
Git
Description :
It happens when the software you use is tampered with or altered without
permission. (Hackers add or modify parts of the software to make it do bad
things ). This can happens through
xample :
E
-> Imagine you are baking a cake and someone secretly adds a harmful
ingredient into your recipe.
- > Download game update - if the update is from a fake or
compromised source, it might include a virus that harms your
computer.
Insecure Data Storage :If data is not stored securely,it can be
accessed and altered by unauthorized people.
xample :
E
-> Imagine sending a letter to a friend but someone intercepts it,
changes the content and then sends it on.
-> send a message to your friend. If someone intercepts the message
and changes it before it reached to your friend thats a data integrity
failure
Preventions :
x : packing box - toy have many parts - disassemble - put all parts in box
E
- write instructions label on box - send
Insecure Deserialization :
It's a security issue that happens when an application takes serialized data
from an untrusted source and converts it back into its original form without
properly checking or validating the data. This can lead to serious problems
if the data has been tampered with by attackers.