prep Flashcards
Why perform a penetration test?
A pentest gives you information about your systems vulnerabilities, how probable a successful attack against your infrastructure is, and how you can protect yourself against potential security breaches in the future
What is a pentest vs vuln asssessment?
With vulnerability testing, one is simply scanning for any weaknesses that may reside in any component of the IT Infrastructure. In a pentest, a full-scale cyber-attack or series of cyber-attacks is launched with explicit permission from the client (or whoever is requesting it) in order to specifically find any types or kinds of gaps that have not yet been discovered by the IT security staff.
What are some of the most common network security vulnerabilities that a pentester comes across?
The usage of extremely weak passwords in the network security tools themselves, which include the routers, firewalls, network intrusion devices and so on. Very often, business entities are in a rush to deploy these kinds of technologies, and they forget to create a robust and secure password. This leads to them using the insecure default one set up by the vendor
Implementing security patches on the wrong servers and related network components. There are also times when a security patch is installed on the right machine but not configured properly, thus leaving it wide open to a cyber-attack
The misconfiguration of network devices, as described previously
The use of infected portable media devices (primarily USB drives) and inserting them into a server and other related network components
The lack of a coherent network security policy; even if one was implemented, compliance is still a huge issue
What network ports are commonly examined in a pentesting exercise, and what tool can be used for this?
HTTPS (Port #443) FTP (Port #’s 20 & 21) NTP (Port #123) SSH (Port #22) HTTP (Port #80) Telnet (Port #23) SMTP (Port #25)
What are some ways to avoid brute force attacks?
Can stop authentication after a certain amount of attempts and lock the account
What is the difference between asymmetric and symmetric encryption?
Symmetric encryption uses the same key for decryption and encryption. Asymmetric uses 2 different keys (a public and private key)
What is a cookie?
A piece of information received from a web server and stored in a web browser which can be ready anytime laters
What are the types of cookies?
Session cookies - temporary and last in the session only, and persistent cookies - which are stored on the hard disk drives and last till its expiry or the manual removal of it
How does SSL/TLS work?
Steps
- User initiates the connection by typing the website address. The browser initiates SSL/TLS communication by sending a message to the websites server
- The website’s server sends back the public key or certificate to the user’s browser
- User’s browser checks for the public key or certificate. If it is ok, it creates a symmetric key and sends it back to the website’s server. If the certificate is not ok, the communication fails
- On receiving the symmetric key, the website’s server sends the keys and encrypted requested data
- User’s browser decrypts the content by using a symmetric key and completes the ssl/tls handshake. The user is able to see content and now a connection is established
What is sql injection
- occurs when an attack is able to inject sql queries via input data of an application
- successful attack allows an attacker to access and manipulate the backend db
how to prevent sql injection
- use parameterized queries
- alternatively, input could be validated before being used in queries
- don’t concatenate user-controllable input with application sql to form the query sent to the database
- apply white-list validation on all user input
what is broken authentication?
occurs when an application improperly verifies the identity of a user
this can lead to the exposure of resources or functionality to unintended actors, possibly providing attacks with sensitive information
how do you prevent broken authentication
- beware of insufficient or missing authentication checks that may allow a user to access functionality without supplying correct credentials
- don’t expose session IDs in the url
- implement multi factor authentication
- don’t use user ids or predictable sequential values as session ids. Instead, use a secure server-side session manager that generates a random session id with high entropy
what is sensitive data exposure
- vulnerability where developers expose sensitive user data to unauthorized people like hackers or other 3rd parties
- usually occurs when developers don’t pay attention to where and how data is being used within their application and systems
how do you prevent sensitive data exposure?
- identify where and how data is used and combined
- prevent sending unnecessary data to users
- secure GDPR, PCI, and PII data through encryption
what are XML External Entities (XXE)
- xxe injection can be used on web applications that parse xml input
- an attacker is able to submit xml that can make use of references to external entities
- this attack occurs when the xml processes the input
an attacker can be able to read arbitrary files from the server, perform internal port scanning originating from the server and cause of system impacts like a denial of service
how can you prevent XML External Entities (XXE)
- sanitize user input through filtering or validation
- xml parsers should disable support for external entities (DTD)
- never trust user input
- apply application wide filters or sanitization on all user-provided input
- apply white-list input validation
- disable external entities (DTD) completely
what is broken access control
occurs when users can perform functions they have not been authorized for or when resources can be accessed by unauthorized users
caused by functional level access controls are missing when access checks have not been implemented or when a protection mechanism exists but it not properly configured