CompTIA Pentest+ Certification For Dummies (2022)
- CompTIA Certifications
- 531 pages
- Shared February 2025
- 79 downloads
Get step-by-step guidance for your certification with CompTIA Pentest+ Certification For Dummies (2022).
Preview 31 of 531 pages
See the first 31 pages exactly as they appear in the document.
Page 1 Page 2 Read page 2 as text
Downloaded from StudyXY.com Ww + StudyXY == as . Za \ Rr ' BE \ Study L Anything This ContentHas been Posted On StudyXY.com as supplementary learning material. StudyXY does not endrose any university, college or publisher. Allmaterials posted are under the liability of the contribuors. | 6) www.studyxy.com
Page 3 Page 4 Read page 4 as text
This book comes with access to more content online. Quiz yourself, track your progress, and score high on test day! Register your book or ebook at www.dummies.com/go/getaccess. Select your product, and then follow the prompts to validate your purchase. You'll receive an email with your PIN and net lim
Page 5 Page 6 Read page 6 as text
CompTIA PenTest+ Certification by Glen E. Clarke, MCT dummies
Page 7 Read page 7 as text
CompTIA® PenTest+® Certification For Dummies®, 2nd Edition Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, ww. wi ley .com Copyright © 2022 by John Wiley & Sons, Inc., Hoboken, New Jersey Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any ‘means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www .wiley.com/go/permissions. Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written permission. CompTIA and PenTest+ are trademarks or registered trademarks of CompTIA, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor ‘mentioned in this book. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: WHILE THE PUBLISHER AND AUTHORS HAVE USED THEIR BEST EFFORTS IN PREPARING THIS WORK, THEY MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL ‘WARRANTIES, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES REPRESENTATIVES, WRITTEN SALES MATERIALS OR PROMOTIONAL STATEMENTS FOR THIS WORK. THE FACT THAT AN ORGANIZATION, WEBSITE, OR PRODUCT IS REFERRED TO IN THIS WORK AS A CITATION AND/OR POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE PUBLISHER AND AUTHORS ENDORSE THE INFORMATION OR SERVICES THE ORGANIZATION, WEBSITE, OR PRODUCT MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING PROFESSIONAL SERVICES. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR YOUR SITUATION. YOU SHOULD CONSULT WITH A SPECIALIST WHERE APPROPRIATE. FURTHER, READERS SHOULD BE AWARE THAT WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. NEITHER THE PUBLISHER NOR AUTHORS SHALL BE LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER COMMERCIAL DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR OTHER DAMAGES. For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. For technical support, please visit https: //hub.wiley.com/community/support/dummies. Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to ‘media such as a CD or DVD that is not included in the version you purchased, you may download this material at http: //booksupport .wiley.com. For more information about Wiley products, visit wuw.wiley.com. Library of Congress Control Number: 2022930511 ISBN 978-1-119-86727-2 (pbk); ISBN 978-1-119-86728-9 (ebk); ISBN 978-1-119-86729-6 (ebk) StudyXY
Page 8 Read page 8 as text
Introduction... Pre-Assessment... T Part 1: Planning and Information Gathering ................13 cHapTER 1: Introduction to Penetration Testing ..............................15 chapter 2: Planning and Scoping. ............... o.oo. 39 chapTer 3: Information Gathering........................ ol... 69 chapter 4: Vulnerability Identification ........................ oo... 109 Part 2: Attacks and Exploits....................................153 cuapTers: Exploiting Systems ................... o.oo... 155 cHaper 6: Exploiting Wireless Vulnerabilities. ..............................209 cuapTer 7: Exploiting Application-Based Vulnerabilities ......................247 Part 3: Post-Exploitation and Reporting .....................293 chapter 8: Understanding Post-Exploitation Actions. ........................295 chapter 9: Common Penetration Testing Tools .............................333 cHapTER 10: Analyzing Script Functionality. ..................................385 cHaPTER 11: Reporting and Communication .................................429 Part 4: Appendixes .........................oL.L. 455 apPENDIX A: PenTest+ Exam Details... 457 appenDIX B: COMPTIA PenTest+ Exam Reference Matrix.......................465 appENDIXC:Lab Setup... ee... 489 Index 493 T= StudyXY
Page 9 Page 10 Read page 10 as text
INTRODUCTION .................. About This Book. .......oooviiiiii 1 Conventions Used in This Book. ................coooiiiiiinnn2 Foolish Assumptions... 2 How This Book Is Organized ....................................3 Pre-assessment..............oiiiiiiiiiiiiiiiiiiiiiiaail3 Part 1: Planning and Information Gathering....................3 Part 2: Attacks and Exploits ....................... ol Part 3: Post-Exploitation and Reporting. .......................3 Appendixes. ............ 3 Practice exam. ............oiiiiiiiiiiiiiiii A Icons Used in This Book ............ooiiiiiiiiiiiiiiiiin 4 BeyondtheBook.............................oiilllll5 Where to Go fromHere ....................cooiiiiial5 PRE-ASSESSMENT........................ 7 QUESTIONS Lo vette ete eee eee eee aaa aE PART 1: PLANNING AND INFORMATION GATHERING....13 carrer 1: Introduction to Penetration Testing .................15 Penetration Testing Overview..................................15 Reasons forapentest.....................................016 Who should perform apentest..............................17 How often a pentest should be performed....................19 Defining Penetration Testing Terminology .......................21 Types of assessments. .....................oieiaa.l 21 Pentest strategy. ............coooiiiiiiiiiiii. 22 Threat actors and threat models ............................23 Looking at CompTIA's Penetration Testing Phases.......................ciiiiiiii... 25 Planning and scoping .................................025 Information gathering and vulnerability identification ..........26 Attacks and exploits ............... oll 27 Reporting and communication ..............................27 Identifying Testing Standards and Methodologies. ................28 MITREATT&CK . o.oo. 29 Open Web Application Security Project (OWASP). ..............29 National Institute of Standards and Technology (NIST). .........31 OSSTMM, PTES, and ISSAF ..................ooiiiin.o.....32 BR + study xy |
Page 11 Read page 11 as text
Reviewing Key Concepts. ...............oooviviiniieno.......33 Prep Test. .... o.oo L034 ANSWETS. oot 2 37 carer: Planning and Scoping...................039 Understanding Key Legal Concepts .............................39 Written authorization... 40 Contracts and agreements. .....................o..oen......40 Disclaimers... 42 Scoping the Project... 42 Target list/in-scope assets ................................. 43 General questions. ................... oil. 44 Web application testing questions ...........................45 Wireless network testing questions ..........................45 Physical security testing questions...........................45 Social engineering testing questions .........................46 Testing questions for ITstaff................................46 Identifying the Rules of Engagement (ROE) .......................46 Environmental considerations. .......................... 47 Target audience and reason for the pentest...................48 Communication escalationpath.............................48 Resources and requirements ...............................49 Budget..................ll52 Impact analysis and remediation timelines. ...................52 Defining Targets for the Pentest................................53 Internal and external targets................................53 First-party versus third-party hosted .........................53 Othertargets ..............ocoiiiiiiiiiiiiieaen......54 Target considerations. .....................................54 Verifying Acceptance to Risk ...................................56 Scheduling the Pentest and Managing Scope Creep ...............57 Scheduling ............... ll 57 SCOPE CreEP vite eie eee eieie ieee... 58 Conducting Compliance-based Assessments. ....................59 Considerations with compliance-based assessments ...........59 Restrictions with compliance-based assessments. .............60 Validate scope of engagement ..............................61 Maintaining professionalism and integrity ....................62 Risks to the professional ...................................62 Reviewing Key Concepts. .................cooviiiiienon......63 Prep Test... o.oo... B4 ANSWETS. ott eee 67 Vill CompTIA Pentest+ Certification For Dummies
Page 12 Read page 12 as text
carrera: Information Gathering ................................69 Looking at Information-Gathering Tools and Techniques. ..........70 Passive information gathering/passive reconnaissance .........70 Active information gathering/active reconnaissance. ...........85 Understanding Scanning and Enumeration ......................86 Passive scanning ................... ieee... 86 Activescanning ............... ol. 87 Enumeration... 20.95 Analyze the results of a reconnaissance exercise ..............98 Detection Methods and Tokens ................................98 Defense detection................oooiiiiiiiiiiiiil 99 Security tokens. .......... oo. 99 Lab EXercises .............ooviiiiiiiiiiiiiiiiiiieei..... 100 Exercise 3-1: Conduct a Whois Search .......................100 Exercise 3-2: Use theHarvester to collect email addresses. .....101 Exercise 3-3: Use Shodan to discover systems onthelnternet..................ooviiiiiiiiiiiaenn......101 Exercise 3-4: Use recon-ng for OSINT information gathering. ........... e102 Exercise 3-5: Use dig for DNS profiling. ......................102 Exercise 3-6: Use Nmap toportscan........................102 Reviewing Key Concepts. ............ocvviiiniaiieeen........103 Prep Test. ......oooiuiiiiiiiiii ieee. 104 EE [074 euarrers: Vulnerability Identification...........................100 Understanding Vulnerabilities. ................................109 Types of vulnerability scans. ...............................110 Vulnerability scan considerations...........................114 Performing a Vulnerability Scan ...............................115 Installing Nessus .............................ooel.ll 116 Running Nessus. ............coooviiieneenanenena..... 119 Using other vulnerability scanners. .........................123 Analyzing Vulnerability Results ................................124 Mapping vulnerabilities to exploits. .........................127 Understanding the CVSS base score.........................129 Prioritizing activities ........................... 000132 Considerations for analyzing scanresults....................133 Attacks and Weaknesses in Specialized Systems ................... oll 136 Mobile devices...................ii.. 00136 Cloud technologies .............................0........138 Internet of Things (loT) devices. ............................140 Data storage system vulnerabilities.........................142 Underlying software vulnerabilities .........................142 BR + study xy |
Page 13 Read page 13 as text
Management interface vulnerabilities .......................143 Vulnerabilities related to SCADA, lloT,and ICS... 143 Vulnerabilities related to virtual environments and containers. .............................144 Lab EXercises ............oooiieiiiiiiiiiiiiiiiie... 145 Exercise 4-1: Download and install Nessus ...................145 Exercise 4-2: Perform a vulnerability scan....................146 Exercise 4-3: Perform a web application vulnerability scanwith Nessus... 148 Reviewing Key Concepts. ...............cooovieiininen........148 Prep Test. ........ooiiii L149 ANSWETS. Lettie 150 PART 2: ATTACKS AND EXPLOITS.............................153 cuarrers: Exploiting Systems ..................155 Exploiting Systems with Metasploit ............................155 Starting Metasploit .......................................156 Searching foranexploit...................................157 Using an exploit...............................o.........158 Running the exploit.......................................160 Settingthepayload.......................................161 Using msfvenom .......................................0 163 Using exploit resources ...................................165 Understanding Social Engineering .............................166 Email phishing ...........................................166 USBkeydrop..........o.oiniiiiiiiiiie L167 Other forms of social engineering ..........................168 Methods of influence .....................................168 Using SET to perform an attack. ............................169 Using BeEF to perform anattack............................171 Call spoofing tools..........................ooell. 175 Pretexting..................oiiiiiiiiieenL 175 Looking at Attacks on Physical Security .........................176 Types of physical security controls. .........................176 Exploiting physical security ................................176 Common Attack Techniques ..................................178 Password cracking. ................. ool... 178 Using exploits. .....................ooiil... 0180 Deception ........o.oiii ee, 182 Exploiting Network-Based Vulnerabilities .......................182 Common tools used for network-based attacks. ..............183 Common network-based exploits. ..........................183 X CompTIA Pentest+ Certification For Dummies
Page 14 Read page 14 as text
Man-in-the-middle (MiTM) attacks ..........................185 Other common attacks. ..............c.oovviiiinaen.......188 Exploiting Local-Host Vulnerabilities ...........................190 Operating system vulnerabilities ...........................190 Unsecure service and protocol configurations. ...............191 Privilege escalation ...................... 90 Default account settings. ..................................194 Sandbox escape................iiiiiiiiiiiee.... 2195 Physical device security ...................................195 Lab EXercises ............oooviiiiiiiiiiiiiiiiiiiiaiae.... 196 Exercise 5-1: Exploit an SMB service with Metasploit. ..........196 Exercise 5-2: Use the meterpreter exploit payload ............197 Exercise 5-3: Conduct a MiTM attack with SETH...............199 Exercise 5-4: Use SET for credential harvesting ...............200 Exercise 5-5: Use BeEF to exploitaweb browser ...............................L.0200 Reviewing Key Concepts. ...............cooviiniineeen........204 PrepTest.........coooiiiiiiii ieee... 205 EE 0) cuarrers: Exploiting Wireless Vulnerabilities ..................200 Understanding Wireless Terminology ..........................209 Wireless concepts ............oooiiiiiiiiiiiiieiae........210 Wireless equipment and configuration ......................212 Types of wireless networks ................................213 Introducing Wireless Standards ...............................213 802.11a. ities 214 80211b.. 214 802.118 Lette eee 214 802. 1MN. e214 802.178C tiie ieee 2215 Looking at Wireless Configuration and Troubleshooting. ........................................215 Reviewing the Basic Service Set.............................215 Designing a multi-access point WLAN .......................216 Troubleshooting wireless networks .........................217 Implementing Wireless Security Practices. ......................218 General security practices .................................218 Encryption protocols..................................0.220 Exploiting Wireless Vulnerabilities .............................222 Understanding attack methods and tools....................222 Looking at 802.11 wireless vulnerabilities. ...................224 Looking at RF-based vulnerabilities .........................226 Cracking WEP encryption ..................................228 WPS pinattack..............oooooii L232 BR + study xy |
Page 15 Read page 15 as text
Cracking WPA/WPA2 encryption keys. .......................234 Using Wifite to hack wireless networks ......................237 Exploiting Bluetooth devices ...............................238 Lab EXercises ............ooiiiiiiiiiiiiiiiie. 2240 Exercise 6-1: Crack WEP encryption .........................240 Exercise 6-2: Crack the WPS pin ............................24 Exercise 6-3: Crack the WPA/WPA2 encryption key ............241 Exercise 6-4: Test Bluetooth devices. ........................241 Reviewing Key Concepts. .............ooveininiininin.......242 Prep Test. .... o.oo... 243 ANSWETS. © ott ete eee ieee... 246 eaeer 7: Exploiting Application-Based Vulnerabilities. ...... 247 Looking at Common Application-Based Attacks. .................247 Injection attacks. .................. iiii.l......248 Authentication attacks ....................ooiiiiii.. LL. 254 Authorization attacks ..................cooill. 256 XSS and CSRF/XSRF attacks ...................oo.ovn.......258 Understanding Application Security Vulnerabilities. ..............263 Clickjacking. ............. oii... 0.263 Security misconfiguration .................................263 Fileinclusion................. iL. 266 Privilege escalation .......................................266 Session replay and session fixation .........................267 Common Coding Mistakes. ...................................267 Business logic flaws. .................... lL ....267 Unauthorized use of functions/unprotected APIs .............269 Hidden elements/sensitive information in the DOM. ...........270 Insecure data transmission ...............oooiiieen 0271 Lack of code signing ........................l0270 Secure Coding Best Practices. ....................cooeoa.. L271 Validation... 270 Sanitization... 272 Escaping ........ooviiiii e272 Parameterized queries.................... lll 272 Common Tools and Resources. ................ovevvneee.....273 Commontools............ooiiiiiiiiiii 0273 COMMON reSOUNCeS. . ov vetaeieeeneeieeenneenn... 273 Lab EXercises .........ooovviiiiiiiiiiiiiiiiiii e274 Exercise 7-1: Perform a CSRF attack.........................274 Exercise 7-2: Perform a SQL injection. .......................278 Exercise 7-3: Perform a command injection attack ............283 Exercise 7-4: Perform a reflected XSS attack. .................284 Exercise 7-5: Perform a persistent XSS attack. ................284 Exercise 7-6: Reset the DVWA ..............................286 Xll CompTIA Pentest+ Certification For Dummies
Page 16 Read page 16 as text
Reviewing Key Concepts. ...............cooviiiiienaon........286 PrepTest.........ouiiiiii ee... 288 ANSWERS. Lo otie iinet 2291 PART 3: POST-EXPLOITATION AND REPORTING ..........293 aarrers: Understanding Post-Exploitation Actions..........295 Common Post-Exploitation Tasks. .............................296 Understanding the context ................................298 Collecting information ....................................299 Obtainingashell .........................................301 Retrieving password hashes ...............................301 Disabling the antivirus software ............................302 Migrating to a different process ............................302 Privilege escalation and restrictive shells ....................303 Taking screenshots .......................................303 Taking remote control ....................................303 Capturing keystrokes .....................................304 Enabling thewebcam .....................................304 Network segmentation testing .............................306 Performing Lateral Movement ................................306 PS remoting/WinRM ..................................l.307 Using PSEX€C. ........ooviiiiiiii ieee... 308 Using PsExec with passthe hash ...........................309 USingRDP.......... oii. 31 Using RPC/DCOM. .......ooiiii ieee. 2.312 Using remote services. ....................................313 Other techniques for lateral movement .....................317 Maintaining Access (Persistence) ..............................318 New user creation................cooiiiiiiiiine......318 Planting backdoors and trojans ............................320 Other techniques for maintaining access ....................320 Detection avoidance ................oooiiiiiiiinin... 2.321 Covering Your Tracks .................ooiiiiiien......321 Lab EXercises ............oooviiiiiiiiiiiiiiiiiiai.. 2323 Exercise 8-1: Exploit a system and collect information .........323 Exercise 8-2: Record keystrokes ............................324 Exercise 8-3: Obtain password hashes. ......................324 Exercise 8-4: Move laterally ................................325 Exercise 8-5: Create a backdoor account. ....................326 Exercise 8-6: Cover yourtracks.............................326 Reviewing Key Concepts. ..............ovviininenon.......327 PrepTest.........cooiiiiiiii ea... 328 aE PC <1 | BR | study |
Page 17 Read page 17 as text
carers: COMmon Penetration Testing Tools.................333 Understanding Use Cases for Common Pentest Tools ............333 Reconnaissance. .............oooiiiiiiiiiiiiiaea.. 0.334 Enumeration. ........... ooo. 334 Vulnerability scanning. ....................................334 Credential attacks ...............ooooiiiiiiiiiiin.. 00.335 Persistence. ..............ciiiiiiiiii 00335 Configuration compliance .................................336 Evasion ......... o.oo. 336 Decompilation and debugging .............................336 Forensics. ..........oooiiiiiiiiiiii 20336 Software assurance. ..............ooiiiiiiieiiiaiin......337 Looking at Common Pentest Tools. ............................337 SCANNETS. ..\\tti ete... 2338 Credential testing tools. ...................................342 Debuggers ............ oii... 349 Software-assurance tools. ....................oooiin.......350 Open-source intelligence (OSINT) tools ......................351 Wireless tools... 352 Web application tools/web proxies .........................354 Social engineering tools ...................................356 Remote access tools ...............ooiiiiiiiiiiia.. 0357 Networking tools.........................................358 Mobile tools... 0359 Steganography tools......................................359 Cloud tools. ........ooiiiiii 00360 Miscellaneous tools. ..............oooiiiiiiiiiii. 362 Analyzing Tool Output ........................coiien.......363 Password cracking. .................... oo. o........363 Passthehash.............................o....365 Settingupabindshell ....................................367 Gettingareverseshell ....................................368 Proxying a connection ...................... ooo... 369 Uploadingawebshell.....................................370 Injections... L370 Lab EXercises ............ooiiiiiiiiiiiiiiiiie. 2 371 Exercise 9-1: Crack passwords with John the Ripper ...........372 Exercise 9-2: Locate web servers. ...........................372 Exercise 9-3: Scan web applications for vulnerabilities... ......373 Exercise 9-4: Use Hydra for password cracking over RDP. ......373 Exercise 9-5: Use Hydra to crack website credentials ..........374 Exercise 9-6: Use CeWL to create awordlist ..................376 Exercise 9-7: Use Netcat/Ncat to create a bind shell ...........376 Exercise 9-8: Using Responder and John the Ripper to capture and crack password hashes ......................377 XIV CompTIA Pentest+ Certification For Dummies
Page 18 Read page 18 as text
Reviewing Key Concepts. .................ooeeiienon........380 PrepTest...........oiiiiiiii ieee... 381 EE PC 1.7 cuarrer 10: Analyzing Script Functionality .......................385 Reviewing Scripting Concepts ......................oou........386 Variablesandarrays......................................386 Looping and flow control ..................................387 Understanding operators. .................................390 Data structures ..............coooiiiiiiiiiiiiaaiiae......390 Parts of software and scripts...............................392 Common operations. ...............ccoeeuiiienaena.......392 Errorhandling .............................l......394 Using Bash Scripting. ........................................395 Variablesand arrays ......................................395 Looping and flow control. .................................397 Executing the script.......................................398 Errorhandling .........................lll0399 Inputand output... 399 Understanding Python Scripting...............................400 Variablesand arrays......................................400 Looping and flow control ..................................402 Executing the script.......................................403 Errorhandling ...........................................403 Inputand output... 404 Working with Ruby Scripting ..................................405 Variablesand arrays......................................405 Looping and flow control. .................................406 Executing the script.......................................408 Errorhandling ...........................................408 Inputand output... 409 Coding in PowerShell Scripting ................................410 Variablesandarrays......................................410 Looping and flow control ................................ 410 Executing the script.....................................0 43 Errorhandling ................. ll 414 Inputand output... AT4 Code Examples and Automation...............................415 Analyze exploitcode......................................415 Opportunities for automation. .............................422 Lab EX@rcises ........oovieiiiiiiiiiieii e422 Exercise 10-1: Review Bash script. ..........................422 Exercise 10-2: Review Python script.........................423 Exercise 10-3: Review PowerShell script .....................424 BR | study xy |
Page 19 Read page 19 as text
Reviewing Key Concepts. ..............cooviviienenno......425 Prep Test... .. o.oo. 426 ANSWETS. © oot eee eee e ee eee ieee... 428 cuarrer 11: Reporting and Communication ......................429 Communicating During a PenTest .............................429 Understanding communication paths .......................430 Communication triggers. ................................. 431 Reasons for communication ..........................00432 Goal reprioritization and presentation of findings. ..................................433 Findings and Remediations ...................................433 Shared local administrator credentials ......................434 Weak password complexity ................................434 Plain text passwords. ....................ooiel.. L434 No multifactor authentication..............................435 SQLinjection ........... oii... 435 Unnecessary open services ................................436 Focusing Your Remediation Strategies. .........................436 Recommending the Appropriate Remediation Strategy ...........437 Common technical controls. ...............................437 Common administrative controls...........................439 Common operational controls .............................439 Common physical controls. ................................440 Writing and Handling the Pentest Report .......................440 Common themes/root causes. .............................440 Notetaking and normalization of data.......................441 Risk appetite... AN Reportaudience ................... ol... 442 Reportstructure ................ooiiiiiiiiii.... 442 Secure handling and distribution of reports..................445 Delivering the Report and Post-Report Activities .................446 Post-engagementcleanup.................................446 Clientacceptance. ...........ooivieiiinenaennnnen........447 Administrative tasks ..............oiiii LLL 447 Lab EXercises ............ooiiiiiiiiiiiiiiiiii 448 Exercise 11-1: Create a pentestreport.......................448 Exercise 11-2: Encrypt the pentestreport....................448 Reviewing Key Concepts. .............ooovinieainanen........449 Prep Test... ......ooiiiiiiii ee... 450 ANSWETS. otitis 453 XVl CompTIA Pentest+ Certification For Dummies
Page 20 Read page 20 as text
PART 4: APPENDIXES ...........................................455 areenoix i: PenTest+ Exam Details.................................457 CompTIA PenTest+ Certification and Why You Need It ............457 Checking Out the Exam and Its Objectives ......................458 Using This Book to Prepare for the Exam .......................459 Steps to Prepare forthe Exam ................................460 Making Arrangements to Take the Exam. .......................460 The Day the Earth Stood Still: Exam Day ........................461 Arriving at the exam location. ..............................461 Testing online (from home orwork).........................461 Takingtheexam ............................l....462 How does CompTIA setthe pass level? ......................464 aerenoixs: COMPTIA PenTest+ Exam Reference Matrix .......465 2021 PenTest+ Exam Objectives — PTO-002.....................465 aevenoxc:Lab Setup... L489 Setting Up the Virtual Machines ...............................489 Obtaining the Software Needed ...............................490 VMware Workstation. ..................coooiiii LL. 490 Windows Server 2012/2016/2019...........................490 WIndows 7 «oot 490 Kali Linux. . ooo 491 Metasploitable2......................... 490 INDEX oo 493 BR | study |
Page 21 Page 22 Read page 22 as text
Introduction he CompTIA PenTest+ certification is a fast-growing cybersecurity certifi- cation that security professionals attain to prove their security and penetra- tion testing knowledge. The CompTIA PenTest+ certification is a well-recognized certification that not only tests your knowledge on the common tools used to perform a penetration test, but also it tests your knowledge on the process to follow when performing a penetration test. CompTIA PenTest+ Certification For Dummies is designed to be a hands-on, practical guide to help you pass the CompTIA PenTest+ certification exam. This book is written in a way that helps you understand complex technical content and pre- pares you to apply that knowledge to real-world scenarios. I understand the value of a book that covers the points needed to pass the Pen- Test+ certification exam, but I also understand the value of ensuring that the material helps you perform information technology (IT)-related tasks when you are on the job. That is what this book offers — key points to pass the exam com- bined with practical information to help you in the real world, which means this book can be used in more than one way: 3 As an exam preparation tool: Because my goal is to help you pass the PenTest+ exam, this book is packed with exam-specific information. You should understand everything that is in this book before taking the PenTest+ exam, but to help identify key points that you must know, look for icons called For the Exam to help you prepare. » As a reference: Rely on my extensive experience in the IT industry not only to study for (and pass) the PenTest+ exam, but also to help you perform common pentest-related tasks on the job. Thope you find this book a useful tool that you can refer to time and time again in your career. Introd I~ StudyXY
Page 23 Read page 23 as text
Each chapter in this book has different elements that help you prepare to pass the PenTest+ exam. Each chapter includes the following features: 3 Icons: Look for the icons used in each chapter to draw your attention to information needed for the PenTest+ exam or in the real world. For more details on the icons | use, check out the section, “Icons Used in This Book” later in this introduction. 3 Reviewing Key Concepts: Found at the end of each chapter, the “Reviewing Key Concepts” summary covers key points you should remember for the exam. 3 Prep Test: Following each chapter's “Reviewing Key Concepts” section, you will find example questions to help you review the chapter content in preparation for the PenTest+ certification exam. Be sure to do the review questions with each chapter! Then, after you complete the book, check out the practice exam that accompanies this book on the www. dummies . com website. This practice exam is designed to function like the real exam, with the same level of difficulty. (See the section, “Beyond the Book" later in this Introduction for more information about how to access the online practice exam.) I make a few assumptions about you as a reader and have written this book with these assumptions in mind: 3 You are interested in obtaining the PenTest+ certification. After all, the focus of this book is helping you pass the exam. 3 You have a computer to work on. To perform the lab exercises in this book, you need a computer with virtualization software to run multiple virtual machines. | recommend using virtualization software such as Hyper-V or VMWare Player to run Kali Linux, Metasploitable2, a Windows Server, and a Windows client. 3 You will study hard and do as much hands-on work as possible. There is a lot of content covered by the PenTest+ certification exam, and you should read over the information in this book a few times to ensure you understand everything. You should also experiment as much as possible after you read about a particular topic. For example, after you read about running a vulnerabil- ity scan, you should try it. There are lab exercises to help you with this as well. 2 CompTIA Pentest:+ Certification For Dummies v7 StudyXY
Page 24 Read page 24 as text
Like all For Dummies books, chapters are organized into parts. The chapters in each part are related by a specific theme or topic. For example, Part 1: Planning and Information Gathering, contains all the information you need to know in the initial stages of a penetration test. Pre-assessment Before you dive into the book, you'll find a set of pre-assessment questions to test your initial knowledge of the areas covered by the CompTIA PenTest+ certification exam. Take time to review each question to see where you stand, and then verify your work with the answers that follow. Use the chapter reference given to learn more about the topic related to the question. Part 1: Planning and Information Gathering In this part, you discover what the PenTest+ certification is all about and what you will be tested on when taking the CompTIA PenTest+ certification exam. You also learn about how to plan and scope the penetration test, and the tools to use to perform information gathering and vulnerability identification. Part 2: Attacks and Exploits In Part 2, you learn about how exploits are performed on systems to gain access to those systems. You learn about exploiting systems, wireless networks, and how to exploit common weaknesses in applications. Part 3: Post-Exploitation and Reporting Part 3 discusses common post-exploitation actions you can take after exploiting a system and gaining access to that system. Part 3 also discusses scripting lan- guages and how to create a penetration testing report. Appendixes Three appendixes provide helpful information about the PenTest+ exam and use- ful information to help you create a hands-on lab environment to help with your studies. Appendix A introduces you to the exam and gives you a good idea of what you can expect when you go to take the exam. Appendix B includes an exam Introd J ~n + StudyXY
Page 25 Read page 25 as text
objective mapping table that lets you know where in the book each of the exam objectives are covered. This is very useful when you are preparing for the Comp- TIA PenTest+ certification exam to ensure you know each point in the objectives. Appendix C contains a list of the virtual machines (VMs) I use to create the lab exercises and contains useful information to help you build a matching lab envi- ronment to practice your penetration testing skills! Practice exam After you have read through the book multiple times, performed the lab exercises a few times, and completed the end of chapter review questions, you should then take the practice exam available for this book on www.dummies.com. The practice exam gives you the opportunity to experience the feel of a live exam to help you prepare for the real exam. The practice exam also contains sample performance- based questions, which are interactive questions you will find on the real exam. See the section, “Beyond the Book” later in this introduction for more information about how to access the online practice exam. I use a number of icons in this book to draw your attention to pieces of useful information. This icon gives you a heads-up on information you should absolutely know for the PenTest+ certification exam. FOR THE EXAM Information that would be helpful to you in the real world is indicated with a Tip icon. Expect to find shortcuts and timesavers here. ie ® This icon is used to flag information that may be useful to remember on the job. REMEMBER Information that could cause problems to you or to the computer is indicated with a Warning icon. If you see a Warning icon, make sure you read it. The computer you save may be your own. WARNING 4 CompTIA Pentest+ Certification For Dummies ~ F Studyxy
Page 26 Read page 26 as text
In addition to what you’re reading right now, this book comes with a free access- anywhere Cheat Sheet that includes tips to help you prepare for the PenTest+ certification exam. To get this Cheat Sheet, simply go to www.dummies.com and type CompTIA PenTest+ Certification For Dummies Cheat Sheet in the Search box. You also get access to practice exam questions. To gain access to the online prac- tice exam, all you have to do is register. Just follow these simple steps: 1. Register your book or ebook at Dummies.com to get your PIN. Go to www. dummies .com/go/getaccess. 2. Select your product from the drop-down list on that page. 3. Follow the prompts to validate your product, and then check your email for a confirmation message that includes your PIN and instructions for logging in. If you do not receive this email within two hours, please check your spam folder before contacting us through our Technical Support website at https: //support wiley.com or by phone at 877-762-2974. Now you're ready to go! You can come back to the practice material as often as you want — simply log on with the username and password you created during your initial login. No need to enter the access code a second time. Your registration is good for one year from the day you activate your PIN. The CompTIA PenTest+ certification is one of the most popular security certifica- tions for individuals new to ethical hacking and penetration testing. After you pass the CompTIA PenTest+ certification exam, you might want to continue your certification path by studying for the following certifications from CompTIA: 3 Security+: If you haven't completed CompTIA's Security+ certification, this could be the next step. Most candidates complete Security+ before doing PenTest+, but if you haven't, there is no problem going back to do it. Security+ covers IT security topics that help you secure company assets. Introd I~ StudyXY
Page 27 Read page 27 as text
3 CySA+: The CySA+ certification is a vendor-neutral certification that ensures the candidate knows how to respond to security incidents by covering security analytics, intrusion detection, and incident response. 3 CASP+: The final security certification in the CompTIA security track is the CASP+ certification, which covers advanced technical IT security topics. 6 CompTIA Pentest:+ Certification For Dummies ye Study
Page 28 Read page 28 as text
Pre-Assessment he following questions are designed to test you on areas of the CompTIA PenTest+ certification exam that you may need to focus on when reading through this book. Take time to review each question to come up with the best answer for each question. Be sure to verify your work with the pre-assessment answers that follow, and use the chapter reference given to learn more about the topic related to the question. 1. You are performing a penetration test for a large customer. You are using Nmap to determine the ports that are open on the target systems. What phase of the penetration testing process are you currently on? (A) Reporting and communication (B) Attacks and exploits (C) Planning and scoping (D) Information gathering and vulnerability identification 2. You are preparing to perform a penetration test for a customer. What type of document does the customer typically have the penetration tester sign before the penetration test begins? (A) Authorization letter (B) Service-level agreement (C) Non-disclosure agreement (D) Master service agreement 3. Which of the following penetration tools are considered OSINT tools? (Choose two.) (A) Nmap (B) Recon-ng (C) Hydra (D) Metasploit (E) Maltego Pre-Asses: | pp + StudyXY
Page 29 Read page 29 as text
4. You are in the discovery phase of a penetration test and would like to do a port scan on the network, but not perform a ping operation with the port scan. What Nmap switch would you use to disable pings with the port scan? (A) -Pn (B) -p (C) -sP (D) -sT 5. You are looking to discover vulnerabilities on a group of systems that are target systems for your penetration test. What tools would you use to identify vulnerabilities in the systems? (Choose two.) (A) OpenVAS (B) Nessus (C) Hydra (D) Metasploit (E) Nmap 6. During a penetration test you are looking to perform a MiTM attack. Which of the following tools would you use to perform the attack? (A) Hydra (B) Metasploit (C) arpspoof (D) John 7. You are performing a penetration test on a wireless network. You would like to deauthenti- cate the clients from the access point. What tool would you use? (A) Aircrack-ng (B) Aireplay-ng (C) Airodump-ng (D) Deauth-ng 8. While performing a penetration test on a wireless network, you decide to try to brute force the WPS pin on the wireless access point. What command would you use in Kali Linux? (A) aircrack-ng (B) mimikatz (C) reaver (D) wpscrack-ng 8 CompTIA Pentest+ Certification For Dummies
Page 30 Read page 30 as text
9. You are assessing the security of a web application running on a web server within the DMZ. Which of the following represents an example of a command injection attack? (A) http: //site/showData.php?id=1;phpinfo() (B) http: //site/purchase.aspx?redirect=confirmation.aspx (C) http: //site/prodt.php?id=5; update%20products%20set%20price=.50 (D) http: //site/showData.php?dir=%3Bcat%20/etc/passwd 10. You are performing a penetration test for a customer and have exploited a system and gained a meterpreter session. What post-exploitation command was used to obtain the following output? Admin: 500: b45a8125648cbdd204272c bdd£2c4272cba5a81 25648¢ Guest: 501 :b45a8125648cbdd£204272c bdd £2c4272cba5a81 25648¢ testUser :1024:b45a8125648cbdd 204272 : bdd £2c4272ch45a8125648c (A) hashdump (B) hydra (C) kill av (D) truncate 11. You are assessing the security of a web application. What tool would you use to identify vulnerabilities on a website? (A) SQLdict (B) Nmap (€) Nikto (D) Hydra 12. You have obtained the password hash for the administrator account on a system. What tool would you use to crack the password hash? (A) Hashdump (B) Nmap (C) Aircrack-ng (D) Hashcat BR | studyxY |
Page 31 Read page 31 as text
13. During an authorized penetration test, you have used Nmap to locate systems on the network running RDP. What command would you use to perform password cracking using RDP traffic to the system? (A) mimikatz (B) hashcat (C) hydra (D) hashdump 14. What language was used to write the following code? startTime = datetime.now() try: for port in range(1,1024): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = sock.connect_ex((remoteSystemIP, port)) if result == 0: print "Port {}: Open". format (port) sock. close() (A) PowerShell (B) Python (C) Ruby (D) Bash 15. While performing a penetration test for a customer, you notice there is evidence of a previous security compromise on the web server. What should you do? (A) Make a note of it and continue the pentest (B) Continue the pentest and add evidence to the report (C) Patch the system and continue the pentest (D) Halt the pentest and discuss the findings with the stakeholder 10 CompTIA Pentest+ Certification For Dummies vg F Studyxy
500 more pages in the full document
Unlock it once and it stays in your library, ready to chat with or turn into flashcards.
Unlock the full documentMore CompTIA Certifications study materials
See all
Certification GuidesCompTIA Cloud+ CV0-003 Exam Cram (2021)
CompTIA Certifications
434 pages156downloadsFeb 2025
Certification GuidesCompTIA Security+ SY0-601 Exam Certification Bundle, 4th Edition (2021)
CompTIA Certifications
1897 pages152downloadsFeb 2025
Certification GuidesComptia Security+ Practice Tests : exam sy0-601, 2nd Edition (2021)
CompTIA Certifications
339 pages144downloadsFeb 2025
Certification GuidesCompTIA ITF+ CertMike: Exam FC0-U61 (2023)
CompTIA Certifications
464 pages144downloadsFeb 2025
Certification GuidesCompTIA Server+ SK0-005 Certification All-in-One Exam Guide, 2nd Edition (2021)
CompTIA Certifications
628 pages144downloadsFeb 2025
Certification GuidesCompTIA Security+ All-in-One SY0-601 Exam Guide, 6th Edition (2021)
CompTIA Certifications
1093 pages144downloadsFeb 2025
Certification GuidesCompTIA Network+ N10-008 Exam Cram (2021)
CompTIA Certifications
654 pages143downloadsFeb 2025
Certification GuidesCompTIA Security+ Certification Study Guide Exam SY0-601 (2022)
CompTIA Certifications
1024 pages134downloadsFeb 2025
Study this document with CramX
Once it is in your library, every tool can work from it.

