Information security
1. Information security overview
- Protecting information and information systems.
- Defines sets processes and activities performed in order to protect information.
- Goal is to prevent unauthorized users from stealing and misusing information or services.
- If sensitive information falls in wrong hands, it may cause huge losses including
finances, brand reputations, customers.
- If sensitive information falls in wrong hands, it may cause huge losses including
Essential terms
Hack value
- Hackers’ evaluation of whether something is worth or interesting.
- High hack value examples
- Accessing peoples credit card information as it can generate money.
- Just accessing peoples names just to show a difficult task is doable.
Vulnerability
- Weakness which can compromise the system and be used for a possible attack.
- E.g.
- a policy
- e.g. policy regulating whether a personal should stick in USB drives to computer laptops.
- design/implementation errors
- e.g. Linux + macOS + Windows are susceptible to a vulnerability where an USB drive that disguises as keyboard and have greater access on computer
- a policy
Exploit
- Breach through vulnerabilities.
- Also refers to a software that allows taking advantage of identified vulnerabilities.
- E.g. connecting a malicious USB.
Payload
- Part of malware or exploit code.
- Used for e.g.
- Creating backdoors in victims machine
- Damaging or deleting files
- Committing data
- Hijacking a computer
- E.g. a keylogger or a RAT (Remote Administration Tool) that a malicious USB installs.
Zero day attack
- Also known as • zero-day attack • 0-day attack • 0 day attack
- Exploiting previously unknown vulnerabilities before patch is released.
- Zero day vulnerability
- Zero-day exploit
- Taking advantage of zero-day vulnerabilities
- Often done by using malware 3
- Flow
- Attacker discovers the vulnerability
- Attacker exploits vulnerability
- Attack happens (called day zero)
- Vendor learns about vulnerability
- Patch is created
- Sometimes vendor may not patch it e.g. if software is outdated or has no support.
- Patch is applied
- Sometimes they’re not!
- E.g. home routers has vulnerabilities that has been known for years as ISPs do not usually configure routers after setup
- Time frame between patch is created and applied is used by malicious hackers to maximum extend.
- Many times corporations are slower to react which causes harm.
- Sometimes they’re not!
- Window of vulnerability (WOV)
- Time from vulnerability is discovered until most vulnerable systems are patched 1
- Often measured in days e.g. 28 days.
- E.g. Spectre & Meltdown
- Vulnerabilities in AMD and Intel CPUs
- Can be exploited to elevate the privileges in the given system.
- Still exists but no longer a zero day.
- Affected all cloud providers, they needed to run firmware updates, updates provided by Intel that caused delays.
Daisy chaining
- An attack in which hackers gain access to one network/device and then using it to access next networks/devices.
- Steps
- Hackers gain access to a device within your system/network
- e.g. smartwatch, refrigerator, PC.
- They move further by gaining access to next device in your network and then next and so on.
- Potentially hacker owns the network in the end.
- Hackers gain access to a device within your system/network
- Example for hacking banks or similar
- Go after person that has the most access.
- Hack that persons home router as attack vector.
- Because it has the least resistance compared to corporate network.
- Corporate network: has corporate firewalls, IT stuff, policies etc.
- Home router: Rarely updated, full of vulnerabilities.
- They usually run down-sized linux operating system.
- An attack vector is a method or pathway used by a hacker to access or penetrate the target system.
- Because it has the least resistance compared to corporate network.
- Scan devices that are connected to the router.
- Can see communication (can be encrypted) but always sees ports, URLs, addresses being used.
- E.g. mans PC, wifes PC, smart TV/refrigerator, his cell phone, wifes cell phone etc.
- Attack with different attack vector options:
- Change the DNS settings, you can set yourself as DNS.
- Put his computer to DMZ to expose his PC for access from outside world.
- Apply phishing, exploits to the operating system of the devices.
- Get access to one of the systems
- E.g. an Android phone. They have many vulnerabilities.
- They don’t get updates after a while.
- If they exceed design limits e.g. when operating when it’s hot outside, then the hardware flaws occurring causes exploitable software attacks such as Bitsquatting
- E.g. an Android phone. They have many vulnerabilities.
- Get access to
- Information such as bank accounts, credit card details
- After infecting one device, jump other devices in bank network if e.g. the mobile phone is also used in bank network.
Doxing
- Finding and publishing someone’s personally identifiable information (PII) for malicious reasons.
- E.g. an individuals name, e-mail address or sensitive data of an organization.
- E.g. confidential government files get leaked to the public.
- Steps
- Gather private and valuable information about a person/organization
- E.g. photographs, SSN, social accounts, address…
- Build a profile of target by learning more information e.g. through social media.
- Misuse collected information for different reasons.
- E.g. identity theft, stealing financial information to use, coercing their target’s into doing something they don’t want to
- Gather private and valuable information about a person/organization
Bot
- Contraction of “robot”
- A software that can be controlled to execute predefined tasks.
- Used by hackers to control the infected machines for malicious reasons.
- Use-case
- E.g. using a bot to control the computer and perform attacks on other computers
- E.g. creating a botnet by infecting more machines
CIA triad
- Also known as three principles of information security
- Recognized widely as hearth (main focus) of information security
- Should function as as goals and objectives for every security program
- Ensures
- Confidentiality: so no one can see what’s inside.
- Integrity: no one tampers data-in transit
- Availability: data is accessible on demand
Elements of information security
Confidentiality
- Ensures that information is available only to people who are authorized to access it.
- Improper data handling or a hacking attempt leads to confidentiality breaches.
- Controls: • encryption • classification • access control • proper disposal (e.g. of DVDs, CDs, etc.)
Integrity
- Ensures the accuracy of the information
- Prevents improper and unauthorized changes—the
- Controls: • hashing • access control
Availability
- Ensuring resources are available whenever the authorized user needs them
- Controls: • redundancy • data back-ups • antivirus • DDoS prevention
Authenticity
- Ensures the quality of being genuine or uncorrupted, either:
- users are actually who they present themselves to be through authentication
- or a document or information presented is not corrupted.
- Controls: • users (biometrics) • smart cards • data (digital certificates)
Non-repudiation
- Guarantee that
- sender of a message cannot deny having sent the message
- recipient cannot deny having received the message
- Controls: digital signatures, logging
Functionality, usability, security triangle
- Components
- Functionality: the features of the system
- Usability: GUI of the system and how user friendly it is.
- Security: How the processes of the system are used and who is using them
- Interconnected
- Any change made to one component directly affects decreases the other two.
- E.g. if the system security is increased, then the functionality and usability of the system are decreased
- Because of greater overhead of security with more checks or through greater examination.
- Balance each and every one of them to get the desired levels of security, functionality, and usability.
Document types
- Standard
- Mandatory rules used to achieve consistency
- Baseline
- Provide the minimum security level necessary.
- Guideline
- Flexible, recommended actions users are to take in the event there is no standard to follow.
- Procedure
- Detailed step-by-step instructions for accomplishing a task or goal1111
2. Security threats and attacks
- The more valuable information is the higher the threats and chances for an attack are.
Security threats
- 📝 Threat means anything that has potential of causing damage to the system.
Types of threats
Network threats
- Network is the set of devices that are connected through communication channels where data exchange happens between devices
- Attacker may break into the channel and steal the information that is being exchanged.
- E.g. • denial of service attacks (DoS) • password-based attacks • compromised-key attacks, firewall and IDS attacks • DNS and ARP poisoning • man in the middle (MITM) attack • spoofing • session hijacking • information gathering • sniffing…
Host threats
- Attack that tries to gain access to information from a system
- E.g. • password attacks • unauthorized access • profiling • malware attacks • footprinting • denial of service attacks (DoS) • arbitrary code execution • privilege escalation • backdoor attacks • physical security threats
Application threats
- Exploitation of vulnerabilities that exists in the application itself
- Caused by e.g. bad coding practices
- Rushed programs has mistakes e.g. lack of validation of input data
- Can be found through reverse engineering, or trial and error
- Large codes that are difficult to maintain has more vulnerabilities.
- Mostly because of improper input validation.
- E.g. • SQL injection • cross-site scripting • session hijacking • identity spoofing • improper input validation • security misconfiguration • information disclosure • hidden-field manipulation • broken session management • cryptography attacks • buffer overflow attacks • phishing
Security attacks
- Or cyber attack
- Attempt to gain unauthorized access to a system or network.
- Actualization of a threat
Motives
- Attack = Motive + Vulnerability + Method (exploit)
- General core of every motives is access to the valuable information
- Common motives:
- Interrupting the flow of business activities and processes
- Stealing valuable information
- Data manipulation
- Stealing money and important financial information
- Revenge
- Ransom
Types of attacks
- You need to find vulnerability in a system to have an attack
- You can never prove that’s its not vulnerable, but can prove it’s vulnerable.
- or You can never prove that a system is secure, but can prove it’s insecure.
Operating system attacks
- ❗ If OS is taken over protecting applications won’t matter.
- Vulnerabilities include
- Bugs (as it’s a big codebase)
- Buffer overflow
- Unpatched operating systems
- Can lead to successful leads using already known vulnerabilities
- 🤗 E.g. Microsoft had already patched the EternalBlue vulnerability that NSA developed before it was leaked to public. However, many systems still remained unpatched due to users not updating their systems. So the same vulnerability on unpatched systems were still successfuly exploited by first WannaCry ransomware that compromised hundreds of thousands computers, and then by NotPetya malware. 1
- Attacks include
- Exploiting network protocol implementations
- Authentication attacks
- Cracking passwords
- Breaking filesystem security
- 💡 Secure OS is an OS that’s updated, monitored, regulated as frequently as possible.
- See also banner grabbing
Misconfiguration attacks
- Hacker gains access to the system that has poorly configured security.
- Can affect works, databases, web servers, etc.
- E.g. • using default accounts (passwords) • forgetting Apache server online to allow proxy requests enabling DDoS attacks
- 💡 Detected mostly by automated scanners
Application-level attacks
- Similar to OS attacks but far less damaging as their scope is far narrower.
- Caused by lack of testing as developers rush development of applications and miss something.
- E.g. • sensitive information disclosure • buffer overflow attack • SQL injection v cross-site scripting • session hijacking denial of service • man in the middle • phishing
- 🤗 E.g. Transmission torrent client (macOS)
- The store where it was downloaded was compromised
- They substituted torrent download link to their own application
- See Transmission is hacked to spread malware
Shrink-wrap code attacks
- Attacks on libraries and frameworks that the software is depended on.
- Finding vulnerabilities in libraries allows re-using same exploits on more than single application
- 💡 Use libraries: older, more mature, maintained, updated actively with proven track record.
- E.g.
- A bug is fixed in library but application uses older version.
- Application uses libraries in debug mode or with default configurations.
Attack vectors
- Attack vector = Means by which hackers deliver a payload to systems and networks
- Cloud computing threats such as data breach and loss.
- IoT threats usually caused by insecure devices and hardware constraints (battery, memory, CPU etc.)
- Ransomware: Restricts access to your files and requires payment to be granted access
- Mobile threats
Advanced Persistent Threats (APT)
- 📝 Stealthy threat actor with continuous attacks targeting a specific entity.
- APT groups include:
- Advanced
- Uses special malware, often crafted for specific organizations
- Usually a modified version of common malware used in botnets
- Sophisticated techniques against target not generic
- Uses special malware, often crafted for specific organizations
- Persistent
- Long-term presence with external command and control
- Extracting data
- Usually low-and-slow to avoid detection
- E.g. instead of sending big data, it breaks data to chunks and sends each chunk whenever a user is connected to the internet
- Threat
- Targets high value organizations and information
- E.g. governments and big companies
- 🤗 E.g.
- Sony Pictures hack where sensitive data from Sony, e.g. unreleased movies was published as torrents.
- 2020 United States federal government data breach where more than 18.000 US companies and government agencies where hacked.
- Common steps
- Create a breach e.g. through spear phishing
- Exploit inner system vulnerabilities
- Control of the system or its segments
- Data exfiltration (= unauthorized data transfer)
Viruses and worms
- Both can replicates themselves throughout the system in files, documents.
- Have capabilities to infect systems and networks in a quick time.
- Virus: Requires user action to be activated e.g. running a file that has a virus embedded.
- Worm: can spread independently without any user action i.e. self-replicating
Botnet
- 📝 Used by hackers to control the infected machines e.g. phones, PC, IoT
- Hackers perform malicious activities from the machines on which bots run eg. DDoS attacks.
- Main problem is lack of security software or proper updates on devices.
- See also Botnet trojans and Botnets | Denial of Service
Insider attacks
- Performed by a person from within the organization who has authorized access.
- E.g. disgruntled employee, employee paid by a third-party
- Presents one of the greatest potential of risk and most difficult attacks to defend against.
- See also Insider attacks | Social engineering types.
Insider threat types
- Pure insider
- Inside employee with normal access rights
- Elevated pure insider
- Insider with elevated access
- Insider associate
- Insider with limited authorized access (e.g. guard, cleaning person)
- Insider affiliate
- Spouse, friend, or client of an employee that uses employee’s credentials.
- Outsider affiliate
- Unknown and untrusted person from outside the organization.
- Uses an open access channel or stolen credentials to gain unauthorized access.
Insider attack countermeasures
- Restricting access
- Logging to know who access what at what point of time
- Active monitoring of employees with elevated privileges
- Trying to not have disgruntled employees
- Separation of duties
- Also known as segregation of duties
- Concept of having more than one person required to complete a task.
- See also Separation of duties | Cloud computing
Phishing
Web application threats
- Takes advantage of poorly written code and lack of proper validation of input and output data.
- E.g. buffer overflows, SQL injections, cross-site scripting
- 💡 There are many online scanning tools to detect those.
Modern age information warfare
- Use of information and communication technologies for competitive advantages over an opponent
- Weapons include • viruses • worms • trojan horses • logic bombs • trap doors • nano machines and microbes • electronic jamming • penetration exploits and tools.
- E.g.
- Corporations spy on each other to use each others technology secrets and patents
- 🤗 Also known as Industrial espionage
- Governments spy on other governments by using hackers as proxies to gain information about e.g. defense systems.
- Intellectual property thefts with reverse engineering to create products without investing in R&D
- Corporations spy on each other to use each others technology secrets and patents
- Categories include:
- Command and control (C2) warfare
- Taking down the command center may protect the headquarters but may interfere with their mobility
- Intelligence-based warfare
- Sensor-based technology to disrupt systems
- Electronic warfare
- Enhance, degrade, or intercept the flow of information
- Psychological warfare
- “Capture their minds and their hearts and souls will follow”
- E.g. propaganda or terror
- Hacker warfare
- Acquire information about subject A, sell it to subject B.
- Economic information warfare
- Channeling or blocking information to pursue economic dominance
- Cyber warfare: use of information systems against virtual personas
- Command and control (C2) warfare
- Each category can have:
- Offensive strategy
- Attacks against an opponent
- E.g. web application attacks, malware attacks, system hacking..
- Defensive strategy
- Actions taken against attacks.
- E.g. monitoring, alerts, response, detection, prevention systems
- Offensive strategy
- See also Information Warfare website
CEH-in-bullet-points/chapters/01-introduction/security-threats-and-attacks.md at master · undergroundwires/CEH-in-bullet-points · GitHub
3. Information security controls
a. Information security controls overview
Information Assurance (IA)
- Maintaining following of information during its use, storage, processing and transfer:
- Integrity: No tampering of data from point A to point B, e.g. restraining physical access.
- Availability: At all times data needs to be available to those who need it, e.g. stock market
- Confidentiality: No leaks, e.g. ensuring policies are in-place
- Authenticity: Only those who are authorized can access something
- Non-repudiation: If you do something, you cannot say I did not do it, e.g. signatures, log files, camera videos.
- Processes to achieve information assurance are:
- Security policies
- Network and user authentication strategy
- Identification of vulnerabilities and threats e.g. pen-testing
- Identification of problems in the system and resource requirements
- Plan design for the identified requirements
- Certification and accreditation to find vulnerabilities and remove them
- Training for employees
Types of control
- By type
- Physical controls
- E.g. fences, doors, locks and fire extinguishers
- Technical controls
- Also known as logical controls
- E.g. security tokens
- Administrative controls
- E.g. security policies and continuity of operations plans are administrative control
- Physical controls
- By function
- Preventative controls
- Prevents the threat from coming in contact with the weakness
- E.g. authentication, encryption (such as IPSec)
- Detective controls
- Used after a discretionary event.
- E.g. audits, alarm bells, alerts
- Corrective controls
- Put in place after the detective internal controls discover a problem
- E.g. backups and restore
- Preventative controls
Information Security Management Program
- All activities the organization takes to protect sensitive information
- E.g. security policies, rules, standards, business resilience, training and awareness, security metrics and reporting.
Enterprise Information Security Architecture (EISA)
- Regulates organizations structure and behavior in terms of security, processes and employees.
- Includes requirements, process, principles and models
- Goals:
- Real time monitoring of organization’s network
- Security breach detection and recovery
- Ensuring cost efficiency of security provisions
- Helping the IT department to function properly
- e.g. with policies and education
- Risk assessment of IT assets
Security management framework
- To reduce risks of any system
- Risks are never zero but you should reduce as much as u can
- Combination of policies, procedures, guidelines and standards
Defense in Depth
- Also known as defence in depth
- 📝 Using multiple layers for protection
- Like a tower defence game
- Provides redundancy in the event a security control fails or a vulnerability is exploited
- Layers:
- Policies, Procedures, Awareness: Data Classification, Risk Management, Code Reviews, Educations…
- Physical security: ID cards, CCTV, fences…
- Maintenance board should be protected in server room.
- Not good in schools, universities etc.
- Perimeter: Encryption, identities…
- In front of the internal network where traffic in and out is filtered.
- Internal network: Network zoning, firewalls…
- Host: Antivirus patches, security updates…
- Individual devices with networking capability e.g. servers / PCs.
- Services: Audit logs, authentication, authorization, coding practices.
- Applications running on hosts
- Data: Backups, encryption…
CEH-in-bullet-points/chapters/01-introduction/information-security-controls.md at master · undergroundwires/CEH-in-bullet-points · GitHub
b. Risk management
- Ongoing process of identifying, assessing and acting on potential risks.
- ❗📝 Risk management controls reduce risks but one can never fully eliminate all risk
- Nothing is 100% risk-free.
Risk
- Risk
- Threat of damage or loss
- Risk mitigation
- Also known as risk reduction
- Taking action to reduce an organization’s exposure to potential risks and reduce the likelihood that those risks will happen again.
- 📝 Risk equation
Risk = Threat x Vulnerability x Asset
- E.g. network is very vulnerable (no firewall), asset is critical: high risk.
- E.g. network is well protected, asset is critical: medium risk
- 📝 Likelihood
- Likelihood is how probable it is that an event will occur
- 📝 Impact
- Estimate of the harm that could be caused by an event
Types of risks
- 📝 Inherent risk
- Represents the amount of risk that exists before any controls are taken.
- Raw and untreated risk
- 📝 Residual risk
- Amount of risk that remains after controls are accounted for.
- Control risks
- Risks that occur due to weaknesses in internal controls
- Audit risk
- Risk of error while performing an audit.
- Three types: Control risk, detection risk, inherent risk
- Detection risk
- Verifier does not detect a material misstatement
Level of risk
Defined based on events possible consequences to evaluate.
Level of risk equation
Consequence x Likelihood
Risk Level Consequence Action Extreme / high Serious danger Measures should be immediately taken to reduce the risk Medium Medium danger Measures should be taken as soon as possible Low Negligible danger Preventive measures should be taken to mitigate the risk
Risk matrix
Risk assessment
- 📝 Prioritizes risks based on severity and likelihood of occurrence
- 📝 Includes an analysis of threats based on the impact to the business
- E.g. HIPAA security risk assessment tool to assess risks regarding: • administrative safeguards • technical safeguards • physical safeguards as defined in HIPAA rules.
- 💡 Risk assessor should be a trusted entity or contractor
- As they’ll receive detailed vulnerability information and security architecture information
Risk management objectives
- Identify the potential risks
- Identify the impacts of those risks
- Create risk management strategy and plan
- Assign priorities to risks
- Analyze the risks
- Control the risk
- e.g. education, enforcing a policy, changing a software etc..
- Develop strategies and plans for long lasting risks
Risk management phases
- 📝 Identification
- What? Why? Consequences?
- Data gathering activities include • threat identification • vulnerability identification • risk control analysis
- Assessment
- Likelihood and impact
- Treatment
- Prioritize, order and document.
- Manage risks through risk response types
- Tracking and review
- Ensures right actions were taken.
- Is action obsolete? Can it be improved? Can cost be decreased?
Risk responses
- 📝 5 risk responses are: • Avoid • Mitigate • Transfer • Accept • Share
- Avoid
- Change the strategy/plan to avoid the risk.
- Mitigate
- Take action to reduce the risk.
- 💡 You should mitigate the risk to a low enough level so that the residual risk can be accepted as you will never be able to remove all risks.
- Transfer
- Transfer risk to another party by e.g. outsourcing or purchasing an insurance.
- Accept
- Decide to take the risk, as without risk there’s no movement/rewards.
- Share
- Distributing the risk, e.g. having two security architects so service can continue if one quits.
Business continuity and disaster recovery (BCDR)
- Risk assessment
- Preparing risk analysis and business impact analysis
- See also risk assessment
- E.g. Disaster recovery risk assessment
- Describes potential risks and their impact to the functioning of an organization.
- Describes both natural and man-made disasters and estimates the probability of each scenario occurring
- Business impact analysis (BIA)
- Predicts the consequences of disruption of a business function
- Process and gathers information needed to develop recovery strategies
- Often includes Annualized Loss Expectancy (ALE) metrics.
- Should be used identifying the potential consequences of a change, or estimating what needs to be modified to accomplish a change
- 📝 Business change impact analysis
- Allows you to identify consequences of a change
- E.g. a new feature can cause resource load and crash the server.
- Business continuity plan (BCP)
- Covers critical processes recovery
- 📝 Includes Disaster recovery plan (DRP) describing:
- How an organization can quickly resume work after an unplanned incident
- What to do to recover
Annualized Loss Expectancy (ALE)
- Annual cost of a loss due to a risk.
- Used often in risk analysis and business impact analysis
- 📝
ALE = ARO (Annual rate of occurrence) x SLE (Single loss expectancy)
- Annual rate of occurrence (ARO)
- E.g. if it occurs every month than it’s 12, if it’s every second year than it’s 1/2
- Single loss expectancy (SLE)
- Total loss value for a single asset after an exploit
SLE (Single Loss Expectancy) = AV (Asset Value) x EF (Exposure Factor)
- Asset value (AV)
- How much would it take to replace 1 asset
- Including product prices, manhours etc.
- Exposure Factor (EF)
- Percentage of asset value lost if threat is realized
- Usually a subjective value
- E.g. an asset is valued at $100,000, and the Exposure Factor (EF) for this asset is 25%. The single loss expectancy (SLE) then, is 25% * $100,000, or $25,000.
- Total cost of ownership (TCO)
- Total cost of a mitigating safeguard
- Return on Investment (ROI)
- Amount of money saved by implementing a safeguard.
- 💡 Good choice if annual Total Cost of Ownership (TCO) is less than Annualized Loss Expectancy (ALE); poor choice otherwise
Threat modeling
- Assessment to see how secure an application is
- identify the threats
- can e.g. use OWASP top 10 as guideline.
- discover application vulnerabilities
- improve security
- e.g. configure in better way, improve source code, enable encryption or ditch the application.
- identify the threats
- 💡 Do it as soon as and often as possible
- E.g. by design phase of the software security development lifecycle (SDL) process
Threat modeling steps
- Identify security objectives
- Understand your integrity, confidentiality, and availability goals
- Application overview
- Understand application and its components (libraries and services), data flows and trust boundaries.
- Decompose application
- Document what each component does, entry and exit points, data flows and trust boundaries.
- Identify threats
- Done for each individual components
- E.g. a misconfiguration (e.g. bad password policy, outdated encryption)
- Identify vulnerabilities
- End with vulnerabilities, overall assessment, prioritization of risks.
Security Development Lifecycle (SDL)
- Set of guidance, best practices, tools, and processes by Microsoft
- Consists of different phases with different actions on each phase:
- Training
- Core security training for developers
- Requirements
- Setting level of security desired
- Design
- Threat modeling
- Attack surface analysis
- Requirements
- Implementation
- Static analysis
- Turning off unsafe functions
- Verification
- Dynamic analysis
- Fuzz testing
- Attack surface reviews
- Release
- Incident response plan
- Final security review
- Certification
- Response
- Allow reporting security problems in products
- Training
CEH-in-bullet-points/chapters/01-introduction/risk-management.md at master · undergroundwires/CEH-in-bullet-points · GitHub
c. Incident management
- 📝 Process of identifying, prioritizing and solving security incidents.
- Goal: Restore the system back to normal, trigger alerts to prevent any potential risks.
- 📝 Steps (flexible, not a strict rule):
- Preparation for incident handling and response
- You know how you’ll handle it when it happens.
- Policies, trainings, tools, guidelines…
- Detection and analysis
- Conduct in-depth analysis to what has happened: why, how, where, what
- Categorization and prioritization
- Notification
- Notify proper people who are affected and who can act on it.
- Containment
- Prevent the occurring incident from causing more damage.
- E.g. put them in quarantine then we’ll figure out what to do
- Forensic investigation
- What happened, why?
- Eradication
- Wipe the threat completely
- Recovery
- Restore the system to working state
- Post-incident activities (lessons learnt)
- Record what happened with final review.
- Have discussion about how to avoid it in future.
- Preparation for incident handling and response
- 🤗 E.g. a developer in Dropbox miscoded authentication function to always return true.
- Anyone could login as whichever you user you want by just typing their e-mail.
- They had review policy but no one paid attention.
- They had protocols against major breach.
- Realized that it was critical and then they brought down the service to prevent huge damage (containment)
- Conducted investigation to see what has happened and started recovery process
- It was recorded and documented for current and future employees
- Help companies address various emergency situations that could occur within their organization.
- Should include who to contact, how to act in an emergency, how to mitigate risk and what resources to use to minimize loss
- Real-time analysis of security alerts generated by network hardware and applications.
- Helps SOC to perform its functions
- 📝 Combines SIM and SEM
- SIM (Security information management)
- Long-term storage as well as analysis and reporting of log data.
- SEM (Security event manager)
- Real-time monitoring
- Correlation of events
- Notifications and console views.
- SIM (Security information management)
- E.g. Splunk is the most popular SIEM.
- Anomaly detection could help detect zero-days, misconfigurations, cyberwarfare
- Automatic parsing, log normalization and categorization
- Visualization to help with pattern detection
- Detection of covert, malicious communications and encrypted channels.
- Aggregation: Combining different log data
- Correlation: Using e.g. AI to bundle events with common attributes
- Alerting: Automated analysis of correlated events
- Dashboards: Helps to see anomalies
- Compliance: Can gather compliance data to produce reports that adopt to existing processes
- Retention: Critical in forensic investigations as network breach is high likely discovered after it happens.
- Forensic analysis: The ability to search across logs on different nodes and time periods based on specific criteria.
- Centralized function within an organization
- Continuously monitors and improves an organization’s security posture
- Prevents, detects, analyzes, and responds to cybersecurity incidents.
- Uses SIEM tool to perform its function
- Also known as CSIRT (Computer Security Incident Response Team) or Computer Emergency Response Team (CERT)
- Focuses on effective and quick incident response.
- Develops and refines the incident response plan.
- Typically receive threat intelligence from the SOC
- 💡 SIRT should first check effort and potential impact of the incident when begin investigation and response process.
- There are also national CERT teams such as US-CERT in USA, CERT-SE in Sweden and TR-CERT in Turkey.
- Monitoring user behavior in attempt to discover potential threats and attacks.
- When patterns are observed and normal is established, an admin can take a look at deviations.
- E.g. monitoring employee behavior against insider threats
- E.g. login attempts based on the location, monitoring access to privileged accounts.
CEH-in-bullet-points/chapters/01-introduction/incident-management.md at master · undergroundwires/CEH-in-bullet-points · GitHub
d. Network security
- Include: Access control, Identification, Authentication, Authorization, Accounting, Cryptography, Security Policy
- Restrictions that determine who has access to what on a system/network.
- Physical access control
- Restricts access to physical locations and buildings.
- Logical access control
- Restricts the access to networks and information.
- Terminology
- Subject = Who’s reaching, user or process which accesses the objects
- Object = What’s being reached, resources upon which the restrictions are placed
- Operation = Verb, What’s being done, the action performed by the subject on the object
- Reference Monitor = implements the rules which define what actions on the object can a subject perform
- Involves
- Identification: unique identity in any given system
- There are your credentials
- e.g. social security number, username and password.
- Authentication
- You’re granted access via credentials
- You use the credentials
- Authorization:
- What you can access, where you can go, can you park somewhere
- Accounting
- Act of logging and creating account of all actions, what has been done.
- Identification: unique identity in any given system
- Grouping networks for efficient management of networks.
- Any network has physical firewalls (routers) which has software to act as firewall and control the traffic
- However it’s hard to manage each network instead best to group them in zones and apply rules in that zone.
- Group of similar people or systems by characteristics e.g. functionalities to apply same rules.
- Properties include:
- Active security policies in regard to the network traffic
- E.g. to implement the policy “secretaries cannot reach twitter”, can block those sites through firewall rule in their zone
- Detection and blocking of malicious traffic
- Software needs to actively scan and label what’s malicious or not and stop malicious traffic
- List of known IP addresses and address sets
- IP address of device and interface are different
- List of the zone interfaces
- Active security policies in regard to the network traffic
- A device or an interface can can have multiple IP addresses
- E.g. wired connection has one interface, another interface to connect to DB
- Maintenance interface
- Last resort to fix stuff
- Usually no security boundaries/guards on those interfaces
- Must have physical security
- E.g. someone goes in to server room in cold jacket codes, plugs in a laptop and uses maintenance interface to fix something.
- Internet zone
- Uncontrolled zone out of boundaries of an organization.
- 📝 DMZ Zone
- Controlled zone.
- Also known as demilitarized zone
- Provides a barrier between the external and internal networks.
- Included in every router.
- Uses firewalls control what can go in and out.
- Production zone
- Restricted zone.
- Firewalls are used to filter inbound and outbound traffic
- Access from uncontrolled networks is strictly controlled.
- Intranet zone
- Controlled zone with less restrictions
- Management zone
- Secured zone which enforces strict policies and limits access to a few authorized users.
CEH-in-bullet-points/chapters/01-introduction/network-security.md at master · undergroundwires/CEH-in-bullet-points · GitHub
e. Security policies
- Rules and requirements that the system has to have to achieve information assurance.
- Defines everything about your layout for the employees
- Written documents including
- Lists of allowed hardware and software
- Locations for related policies and procedures
- Exceptions i.e. exemption rules
- Sanctions for noncompliance e.g. disciplinary actions/punishment/termination
- …
- Types
- Technical policies: define the system configuration
- Administrative policies: define the behavior of employees
- Mitigates risks, prevents something costly from happening.
- E.g. a good policy is NDA, distributed and cannot be repudiated (signed)
- 📝 From most permissive to most strict
- Promiscuous: No restrictions
- Permissive: If something is malicious it’s blocked.
- Prudent: Restrictive
- Paranoid: Highest restrictions
- No restrictions on system resources.
- Do whatever you want
- 💡 Only good when you have bunch of highly trained & well-informed people with proven track record working in a team because otherwise policies would slow them down
- Begins as wide-open, can do anything
- When it knows something is malicious, it’ll be blocked
- Provides maximum amount of security
- Allows only safe stuff
- Very restrictive
- A lot of things are locked up
- Something of such high importance, not worth to take smallest of risks, e.g. government data regarding to citizens
- E.g. access only from police station, they need to submit why they access, lethal data
- 🤗 In Linux firewall there’s a command called panic that’s equivalent to this: Drops all traffic
- Policy types are not limited to the listed.
- Guidelines for using strong password protection on available resources.
- E.g.
- At least 8 characters in length
- Must include upper/letter/number/symbols
- 📝 Defines the account creation process, authority, rights and responsibility of user accounts.
- E.g.
- Put users in groups and decides what the groups can do.
- What needs to be done during account creation
- 📝 Guidelines to users on the processing, storage and transmission of sensitive information
- Goal is to ensure information is appropriately protected from modification or disclosure
- E.g.
- Setting level of sensitivity to information
- Dictates who has access to information
- Determines how information is stored and transmitted
- Describes how information should be deleted from storage media
- Custom rulings for specific scenarios for specific individuals and services
- The terms and conditions of granting special access to system resources.
- Governs the proper usage of corporate email.
- E.g.
- Verify proper signature
- Never click on links, because they’ll never be sent
- Same as Terms of Service or Terms of Use
- 📝 Description of what constitutes acceptable and unacceptable use of the Internet
- Code of conduct governing the behavior of a user whilst connected to the network/Internet.
- E.g.
- ISP providers allows you to use unlimited bandwidth
- In contract you see it says it’s about “fair use”
- Fair use can be e.g. to not exceed 50% maximum potential bandwidth that could be used with that bandwidth
- Prohibiting port scanning or security scanning
- Never revealing a password
- ISP providers allows you to use unlimited bandwidth
- 📝 Governs resources being protected and the rules that control access to them
- Who can access what (humans <-> services)
- E.g. limited access to routers and switches on top floor
- E.g. regulating electric socket placement as someone can connect a Raspberry Pi that can be listening
- What can access what (services <-> services)
- 📝 Defines acceptable methods of remotely connecting to the internal network
- Applies to both who and what
- E.g. enforcing VPN, strong passphrases, defining vendor access and requiring monitoring
- Governs access, management and monitoring of firewalls in an organization.
- Who’ll monitor? How will it be monitored?
- What kind of firewall that’ll be used?
- Defines who can install new resources on the network, approve the installation of new devices, document network changes etc.
- Protects both yourself and the company
- E.g. must always use VPN if not working from office
- 📝 Outlines rules for computer network access, determines how policies are enforced
- Governs e.g. • data access • web-browsing habits • use of passwords and encryption • email attachments.
- Dictates which encryption to use
- Goal is to avoid weak and obsolete algorithms
- Easier if everyone uses same algorithm
- Used by e.g. cloud providers, ISP providers
- Limits ability to be authenticated under some conditions
- E.g. no coffee shop wireless, only through VPN and using MFA
- Steps
- Perform a risk assessment
- Utilize standard guidelines
- Include senior management
- Define sanctions
- Distribute the final version
- Ensure that employees have read the policy
- Enforce policies
- Educate and train employees
- Review and update the policy
- Human Resource department has the responsibility to
- educate and train employees in practices defined by the company’s security policies
- monitor the implementation of the policies
- enforce penalties
- Top-down
- Begins with management establishing a framework for initiating and implementing security practices in the enterprise.¨
- Most important way to ensure employees across an organization will support and follow the policies
- Bottom-up
- Occurs when the system administrators and security personnel try to establish a security program on their own without senior management support and enforcement.
CEH-in-bullet-points/chapters/01-introduction/security-policies.md at master · undergroundwires/CEH-in-bullet-
f. Physical security
- The protection of all assets of an organization from all sorts of threats and attacks.
- Helps in
- Preventing unauthorized access to the system
- Preventing any kind of data manipulation and theft
- Protecting the system against malicious activities such as espionage, damage and theft
- Protecting employees and preventing social engineering attacks
- Categories
- Natural or environmental threats
- E.g. flood, fire, earthquake, dust
- Man-made threats
- E.g. Terrorism, wars, explosions, dumpster diving and theft, vandalism.
- Natural or environmental threats
- See also Physical security | Social engineering
- Implemented before a threat event to reduce or avoid its impact.
- Includes access control mechanisms to prevent access
- Can be technical e.g.
- Firewalls
- Authentication systems.
- Can be administrative e.g.
- Security policies
- 📝 Can be physical e.g.
- Fire extinguishers
- Doors e.g.
- Mantrap
- Also known as air lock, sally port or access control vestibule
- Has two doors, each door requiring a separate form of authentication to open
- Turnstile
- Also known as a turnpike, baffle gate, automated gate
- Allows one person to pass at a time, can enforce one day direction
- Can require a a coin, a ticket, a pass, or similar
- E.g. in train stations
- Mantrap
- Bollard
- Sturdy, short, vertical post
- Used for control road traffic and posts
- Allows to prevent ram-raiding and vehicle-ramming attacks.
- 🤗 Used initially for mooring boats
- Low humidity can cause a buildup of static electricity.
- Leads to corrosion of the components could.
- 💡 Keep humidity level between 45% and 55%.
- Grounding systems help
- E.g. antistatic wrist straps are designed to ground people appropriately
- Provides somewhere for any latent static electricity generated to flow.
- In place to let you know when something has happened or is happening.
- Detects violations and intrusion attempts for investigation.
- E.g. • audit trails and logging • alarm systems • sensors • video surveillance • motion detectors.
- Also known as deterrence controls
- Warns intruders to stay away
- E.g. signs showing • “Be aware of the dog” • “Under surveillance” • “Authorized personal only”
- Used after violation has happened to restore the system to its persistent state
- E.g. backup systems and disaster recovery
- Do not prevent attacks, used when everything else fails
- Goal is to restore everything back to normal
- E.g. when there’s power shortage you need a grid, alternative energy backing: generators, batteries..
- Secure premises and company surroundings
- Secure the reception area
- Lock servers and workstations when not in use
- Lock devices such as modems, removable media, and fax machines when not in use
- Implement access control
- Regularly maintain computer equipment
- Prevent wiretapping
- Monitor the environment by checking the humidity and temperature
- Positive pressure is great at keeping contaminants (e.g. dust, dirt) out of the data center
CEH-in-bullet-points/chapters/01-introduction/physical-security.md at master · undergroundwires/CEH-in-bullet-points · GitHub
g. Data leakage, backup and recovery
- Any sort of unauthorized disclosure of sensitive information from anyone/any system.
- Includes emails, malicious links, device theft etc.
- Data leakage leads to
- loss of trust e.g. trust to governments decreased during late years
- loss of profit e.g. Sony lost profit of their movies after they were leaked before publishing
- Corporate espionage, phishing, malware
- Business partners, consultants when company outsources
- Less surveillance than own employees.
- Also known as insider threats
- Dangers are greater than external threats as they’ll have greater access to the company
- See also insider attacks
- E.g. eavesdropping, shoulder surfing, dumpster diving can be used to acquire data.
- Also known as DLP
- Identification and monitoring of important information that is not to be shared outside the organization.
- Can block, notify the sender or lets admins to analyze, react and report to sensitive data in transit.
- Important tool for enterprise message systems
- Uses different techniques of data access control
- E.g. when e-mailing where content is scanned for fingerprints, classifications and bank account numbers.
- Process of making a duplicate copy of data that already exists.
- Protects against data loss and corruption as it can lead to great financial damages.
- No backup = Far more suspectable to all sorts of attacks, especially ransomware.
- Oldest form, still used by many enterprises.
- Retention time: ≈30 years
- 📝 To pull anything off the tape, you have to fast-forward to wherever the correct file is stored
- Good for restoring systems in one go.
- Bad for incremental backups or storing a few files.
- ❗ Only way to tell if backups are working is to fully restore from the tape and check if it’s correctly restored.
- 2 to 3 times slower than hard drives
- Retention time: ≈25 years
- Cheaper, easily accessible
- Less stability than magnetic tapes
- Retention time: ≈9-20 years
- Includes also usb drives known as Flash storage or thumb-drive.
- Resistant to shock, temperature, being run through the washing machine
- Retention time: ≈10 years
- Requires little infrastructure
- Depends on stable internet connection
- No retention time, high reliability
- Little capacity and pricy.
- Retention time: ≈10 years
- Identify important data
- because backing-up everything is too costly and takes up much storage.
- Choose appropriate backup media
- Reliable, solid, preferably cheap
- E.g. USBs or portable media for personal users, and HDD/SDDs for companies for more speed.
- Choose the appropriate backup strategy
- Check features such as scheduling, monitoring file changes to update back-ups, protocols, integrations…
- Paid vs Free
- Free requires more knowledge and work, training costs (one time)
- E.g. in Linux, set cron job from point A to B
- Paid versions has recurring license costs including training
- Free requires more knowledge and work, training costs (one time)
- Choose appropriate RAID levels
- RAID 1
- 2 disks
- All that are written in disk A is also written to B, if one disk fails, other works
- RAID 5
- 3 disks
- If A fails you can reconstruct based on data in B and C
- RAIDing is not only for backups, can also use for faster read and writes
- E.g. BIG = Everything is seen as one drive. File is written two all of them. Crazy write & read speeds. If single disk dies all data is gone.
- RAID 1
- Choose the appropriate backup method
- Cold backup
- Performed while system is not in use.
- E.g. at nights, during weekends.
- Hot backup
- Performed when system is still used.
- E.g. you type a document, power shortage happens but it’s still saved.
- Warm backup
- Hybrid of the two.
- Period backups while system is in use, but you might lose longer time period than hot backup.
- Cold backup
- Choose the appropriate backup locations
- Three options:
- On-site: Same building / room
- Susceptible to same types of problems like other servers.
- If there’s a breach, fire or earthquake = all data are gone
- Off-site: backup is performed at a remote location
- Cloud:
- Most secure: most cost effective and safe where data won’t be loss, no electricity, no hardware, no maintainable.
- Can be replicated in same building, different buildings in same data center or different regions.
- Can have privacy/trust issues: encrypt
- On-site: Same building / room
- Three options:
- Choose the backup type
- Full backup: Costly, you back up everything
- Incremental backup
- Backs-up on each change of the previous back-up
- When restoring, you need to restore everything from the first full back-up
- Differential backup:
- Back-ups on difference to the initial backup on each backup.s
- Faster restoring time as you only need the last point and the initial full back-up
- Appropriate backup solution: Combination of all of this
- Perform a recovery test
- Ensure you can recover a data that’s lost with DR tests e.g. twice a year.
- Recovery drill
- Simulating data tier outage
- Recovering
- Validate application integrity post recovery
- Recovering lost data
- Reasons
- Accidental lost e.g. • natural disaster • corrupted data
- Or can be intentionally destroyed
- DR stands for “Disaster Recovery”
- Most of data is recoverable but you can have recovery failure if backed up data becomes corrupt.
CEH-in-bullet-points/chapters/01-introduction/data-leakage-backup-and-recovery.md at master · undergroundwires/CEH-in-bullet-points · GitHub
h. Identity and access management (IAM)
- Ensures right users have access to right resources at right time
- Framework of best-practices used by organizations
- Main modules:
- Access Management Module: • Authentication • Authorization.
- Identity Management Module: Management of users and enterprise directory service components of IAM.
- Session Management
- Password Service
- Also known as single sign on
- 📝 Allows one set of login credentials to be used to access multiple applications
- Centralized session and user authentication service
- Easier administration
- Benefits for users including remembering one password instead of many
- Many user authentication problems can be resolved at a central location at SSO point.
- Authentication method that requires the user to provide two or more verification factors to gain access to a resource
- Two-factor authentication (2FA) is subset of MFA using two different factors
- 📝 Authentication factors include
- Knowledge – something only the user knows
- E.g. password or PIN
- Vulnerable to recording user screen, e.g. attack against PayPal
- Possession – something only the user has
- E.g. smart cards, security token
- Vulnerable to be cloned/copied
- Inherence – something only the user is
- E.g. biometrics (• fingerprint, face, voice, iris, retinal recognition • behavioral: keystroke dynamics)
- Retina: Sending an intrusive close light to compare blood vessels
- Iris: Mapping structures of iris using a camera.
- Vulnerable to manually prompting users, e.g. touch ID scams that targeted Apple devices
- E.g. biometrics (• fingerprint, face, voice, iris, retinal recognition • behavioral: keystroke dynamics)
- Location: somewhere the user is
- E.g. based on network, known country
- Vulnerable to proxies
- Knowledge – something only the user knows
- A password that’s only used once and only valid for a limited of time-
- Enforces strong password authentication as it protects against someone getting access to password.
- Usually used when authenticating to VPN, and online Internet banking systems.
- Tool used to generate one-time passwords
- Can be a hardware device or software token installed on the computer or phone.
- Authenticating server use the same algorithm as token to be able to validate the code.
- 📝 Token types
- Synchronous Tokens
- Clock-based tokens
- Also known as Time-based tokens
- Tokens have same time configuration as the authenticating server.
- Both use algorithms that are based on a time and a shared secret key.
- Counter-based tokens
- Both the token and the authenticating server maintain a counter.
- Code consists of the value from the counter and a shared secret key.
- Requires one or more actions from users (e.g. powering on or PIN number) to increment the counter.
- Clock-based tokens
- Asynchronous Tokens
- Also known as • challenge-response tokens • challenge/response tokens
- Server sends a challenge (random value) to user and expects user to enter it.
- Protects against replay attacks
- Synchronous Tokens
- Rule-based Authorization
- Attribute-based Authorization
- Remote Authorization
- Restricting system access to authorized users
- Can implement
- Mandatory access control (MAC)
- OS-enforced access control based on subject’s clearance and object’s labels
- Assigns sensitivity labels to data and controls access by matching the user’s security level to the resource label.
- E.g. traditional Unix system of users, groups, and read-write-execute permissions
- Discretionary access control (DAC)
- Restricting access to objects based on the identity of subjects and/or groups to which they belong
- Allows the data owner to set security permissions for the object
- E.g. unix file mode which represent write, read, and execute in each of the 3 bits for each of User, Group and Others
- E.g. on Windows, you can set sharing and permissions on files/folders you create
- Mandatory access control (MAC)
- RBAC vs MAC vs DAC
Access Control User rights Popular Discretionary Full control OS file systems Mandatory No control, policies are predefined by root/admin OS file systems Role based access No control, policies are predefined by root/admin Cloud computing
- Delegated administration
- User and Role Management
- Provisioning
- Password Management
- Self-service
- Compliance Auditing
- Conduct security audit for company to be compliant with policies/regulations
- Central repository where all others components gets their data
- Includes
- Directory service
- Data synchronization
- Metadirectory
- Virtual directory
CEH-in-bullet-points/chapters/01-introduction/identity-access-management-
4. Threat intelligence and forensics
Cyber kill chain
- Framework for identification and prevention of cyber intrusions activity.
- Developed by Lockheed Martin
- Identifies what the adversaries must complete in order to achieve their objective.
- 🤗 Based on military kill chains, a concept consisting of • target identification • force dispatch to target decision • order to attack the target • the destruction of the target
- 🤗 Critiques states it only defends “perimeter” and isn’t suitable model to insider threats.
- E.g. A “Kill Chain” Analysis of the 2013 Target Data Breach
Cyber kill chain steps
- ❗ Not same in every organization as different organizations have constructed their own kill chains to try to model different threats
- Reconnaissance
- Collecting as much as information about the target.
- E.g. harvesting email addresses, conferece information etc.
- See also footprinting
- Weaponization
- Analyzing collected data to identify and vulnerabilities to exploit to gain access
- E.g. creating a phishing campaign based on collected data
- Delivery
- Weaponized bundle to the victim via email, web, USB, etc.
- Key to measure the effectiveness of the defense strategies implemented by the target.
- E.g. sending phishing emails
- Exploitation
- Execute code on victim’s system.
- E.g. arbitrary code execution, authentication and authorization attacks
- Installation
- Installing malware on the asset
- E.g. backdoor to gain remote access and maintain access in the network
- Command and control
- Allows remote manipulation/exploation of victim
- Done by establishing two-way communication between the victim and the attacker.
- Evidence is usually hidden using encryption techniques
- Actions on objectives
- With hands-on access, intruders accomplish their original goals.
- E.g. • distrupting network • gaining access to confidential data
Defensive courses of action
- Detect: determine whether an attacker is poking around
- Deny: prevent information disclosure and unauthorized access
- Disrupt: stop or change outbound traffic (to attacker)
- Degrade: counter-attack command and control
- Deceive: interfere with command and control
- Contain: network segmentation changes
Threat identification
Tactics, Techniques, and Procedures (TTPs)
- Concept in terrorism and cyber security studies
- Identifies patterns of behavior of the threat actors (= bad guys)
- Aids in
- counterintelligence for threat prediction and detection
- implementing defenses
- profiling threat actors e.g. APT groups
- E.g. In 2020 United States federal government data breach, used TTP were stealing SAML tokens to attack SSO infrastructure according to TTP analysis from NSA.
- Read more at NIST Special Publication 800-159
Tactics
- Also called tools in the acronym
- Highest-level description of the behavior
- Describes ways attacker attacks from start to end
- E.g.
- Way of gathering information e.g. open-source intelligence, social engineering.
- Way of initial compromise e.g. tools, zero-day vulnerabilities, obfuscation methods
Techniques
- Technical methods used by an attacker
- Gives a more detailed description of behavior in the context of a tactic.
- E.g.
- social engineering techniques in early stages
- exploit tools at middle stages
- and software tools to clear logs to cover tracks at later stages.
Procedures
- Lower-level, highly detailed description in the context of a technique.
- Sequence of actions done by attackers
- E.g. an actor collects business e-mails of target company then launches a spear phishing campaign
Adversary behaviors
- Method or techniques used by attacker to penetrate victim network.
- E.g. using PowerShell, DNS Tunneling, Web Shell etc.
Indicators of Compromise (IoCs)
- Artifacts observed that indicates computer intrusion with high confidence.
- 4 categories:
- Email indicators
- E.g. sender’s email address, subject, attachment, links.
- Network indicators
- E.g. URLs, domain names, IP addresses, unusual DNS requests
- Host-based indicators
- E.g. filenames, file hashes, registry keys, DDLs, mutex
- Behavioral indicators
- E.g. memory code injection, remote command execution, document execution PowerShell script.
- Email indicators
CEH-in-bullet-points/chapters/01-introduction/threat-intelligence-and-
5. Laws, standards, and regulations
- Two main categories of legal systems in World. Many systems mix those:
- Common law
- Unwritten laws based on legal precedents established by the courts.
- E.g. USA, UK, India and Canada
- Two main branches:
- Civil law (in common law)
- Between individuals, organizations, or between the two
- Focuses on dispute resolution and victim compensation
- Criminal law
- Includes the punishment and rehabilitation
- Proscribes conduct threatening, harmful, or otherwise endangering to the property, health, safety, and moral welfare of people inclusive of one’s self
- Civil law (in common law)
- Civil law
- Codified statutes and legal codes predominate
- E.g. majority of countries including Germany, France, Spain, Sweden, Turkey..
- Common law
- Payment Card Industry Data Security Standard
- Applies to organizations that card payments and all entities involved in the process of card payment.
- Global data security standard
- Common sense steps presenting best security practices
- 📝 Requires tester to notify organization if cardholder data is accessed during a penetration test
“If cardholder data is accessed during the penetration test, it is important that the tester notify the organization immediately” PCI DSS Guidance recommends:
- See also the official guide, or the simpler version.
- Build and maintain a secure network
- (1) Install and maintain a firewall
- (2) Do not use vendor-supplied defaults for any security parameters (e.g. passwords)
- 📝 Protect cardholder data
- (3) Protect stored data
- Storing cardholder data is discouraged, but if stored it must be encrypted or hashed.
- Never store sensitive data on the magnetic stripe or chip including PIN and CAV2 / CVC2 / CVV2 / CID.
- (4) Encrypt transmission of cardholder data across public networks
- (3) Protect stored data
- Maintain a vulnerability management program
- (5) Use and regularly update anti-virus software
- (6) Develop and maintain secure systems and applications
- 📝 Implement strong access control measures
- (7) Restrict access to cardholder data by business need-to-know
- (8) Assign a unique ID to each person with computer access
- (9) Restrict physical access to cardholder data
- Store media back-ups in a secure location, preferably off site.
- Review and confirm that back-up media is secure at least annually.
- 📝 Regularly monitor and test networks
- (10) Track and monitor all access to network resources and cardholder data
- (11) Regularly test security systems and processes
- (11.1) Test presence of wireless access points on a quarterly basis
- (11.2) Network vulnerability scans at least quarterly and after any significant change
- (11.3) Penetration testing at least once a year and after any significant change
- Maintain an information security policy
- (12) Maintain a policy that addresses information security
- Set of worldwide information security standards
- Also known as ISMS Family of Standards or ISO27K
- ISO/IEC stands for
- “The International Standard for Standardization (ISO)”
- and “The International Electrotechnical Commission (IEC)”
- Titled as “Information technology – Security Techniques – Information security management systems — Requirements”
- Defines requirements for the organization’s information security management system.
- Applies a risk management process
- Used
- To create security requirements and objectives
- To ensure the cost efficiency of managing the security risks
- To ensure that laws and regulations are followed
- For defining new information security processes
- For identifying and clarifying existing information security processes.
- For determining the status of information security management activities in an organization
- For implementing business information security
- For providing relevant security information to customers
- Titled as “Information technology – Security techniques – Code of practice for information security controls”.
- Information security controls to enforce best-practices
- Includes controls for e.g. • Access Control • Cryptography • Access Control • Physical and environmental security…
- Health Insurance Portability and Accountability Act
- 📝 Provides data privacy and protection of medical information.
- Specifies administrative, physical, and technical protection for all entities involved.
- 🤗 Initially created to protect people from losing their health insurance e.g. when changing jobs.
- Extended to reduce costs and administrative burdens of healthcare transactions.
- Healthcare transaction
- A transaction is an electronic exchange of information between two parties to carry out financial or administrative activities related to health care
- Usually represented by claims and enrollment data
- E.g. a health care provider will send a claim to a health plan to request payment for medical services.
- 📝 Standard transactions
- Adopted standard by HSA (U.S. Health & Human Services) under HIPAA
- Include • payment and remittance advice • claims status • eligibility • premium payment • enrollment and disenrollment • referrals and authorizations.
- Electronic transaction and code sets standards
- Every provider who performs electronic transactions needs to use the same health care transactions, codes, and identifiers.
- Security rule
- Ensures the confidentiality, integrity, and security of health information
- Enforcement rule
- Details provisions in regard to the compliance, investigations, violations, and hearing procedures.
- Privacy rule
- Protects a person’s health information and defines who has the access to the information.
- Controls include
- Administrative safeguards such as • performing risk analysis • employee training • security policies and procedures • business associate agreements
- Physical safeguards such as • access controls • policies for workstations (e.g. laptops) • workstation security
- Technical safeguards such as • access control • audit control • integrity control • transmission security
- 📝 National identifier requirements
- National Provider Identifier (NPI): A 10-digit number used for covered healthcare providers
- National Health Plan Identifier (NHI): An identifier that is used for identifying health plans.
- Employer Identifier Standard: A number that identifies employers on standard transactions.
- Federal Information Security Management Act
- 📝 US legislation that regulates federal data security standards and guidelines.
- Protects government information, operations and assets against various threats.
- Provides
- Standards for
- categorizing information and information systems by mission impact
- minimum security requirements for information and information systems
- Guidance for
- choosing appropriate security controls for information systems
- assessing security controls in information systems
- the security authorization of information systems
- Standards for
- Shorthand for National Institute of Standards and Technology Special Publication 800-53
- 📝 Security and privacy controls for federal information systems and organization
- Guidelines to assist in FISMA compliance
- Also known as SOX or Sarbanes Oxley act.
- US federal law
- Protect investors by making corporate disclosures more reliable and accurate
- Regulates what records organizations must keep and for how long
- E.g. banks need to save financial reports for a very long time
- The act contains 11 titles
- Public company accounting oversight board
- Auditor independence
- Corporate responsibility
- Enhanced financial disclosures
- Analyst conflicts of interest
- Commission resources and authority
- Studies and reports
- Corporate and criminal fraud accountability
- White-collar-crime penalty enhancement
- Corporate tax returns
- Corporate fraud accountability
- Digital Millennium Copyright Act
- Copyright laws in the USA
- Implements
- WIPO (World Intellectual Property Organization) Copyright Treaty
- WIPO Performances and Phonograms Treaty
- Against theft of intellectual property
- E.g. platforms must act as they can not benefit from what is yours, most platforms have copyright notice that you can issue.
- Act contains five titles:
- WIPO Treaty Implementation
- Online Copyright Infringement Liability Limitation
- Computer maintenance or repair
- Miscellaneous provisions
- Protection of certain original designs
- Framework created by ISACA for information technology (IT) management and IT governance.
- Helps companies follow law, be more agile and earn more.
- Links business and IT.
- Ties in with COSO, ITIL, BiSL, ISO 27000, CMMI, TOGAF and PMBOK.
- Defines processes for the management of IT
- Evaluate, Direct and Monitor (EDM)
- Align, Plan and Organize (APO)
- Build, Acquire and Implement (BAI)
- Deliver, Service and Support (DSS)
- Monitor, Evaluate and Assess (MEA)
- Components include
- Framework: Link IT objective and best practices to business requirements.
- Process descriptions: Process model to build common language for planning, building, running and monitoring.
- Control objectives: High-level requirements to be considered by management.
- Management guidelines: Helps assign responsibility, agree on objectives, measure performance, and illustrate interrelationship with other processes.
- Maturity models: Assesses maturity and capability per process and helps to address gaps.
- Standard Contractual Clauses
- Contract between an EU based data exporters and a non-EU-based data importers
- Protects personal data sent from the European Union (EU) to countries with lower level of data protection rights
- Ensures GDPR requirements in territories which are not considered to offer adequate protection to the rights and freedoms of data subjects
- Also known as PrivacyShield
- Framework for regulating exchanges of personal data for commercial purposes between the European Union and the United States
- Enables US companies to more easily receive personal data from EU entities
- Became invalid in 16 July 2020 as it did not protect EU citizens on government snooping
- Also known as International Safe Harbor Privacy Principles, Safe Harbour Privacy Principles, Safe Harbour decision
- Signed between US and EU to prevent customer data leakage from private organizations
- Seven principles include: notice, choice (can opt out), onward transfer (only share with compliant companies), security, data integrity, access (can be accessed and deleted by individuals), enforcement
- Abolished in October 2015 and replaced with EU–US Privacy Shield
- Regulates data processing of EU citizens
- Applies in EU and outside of EU if personal data is collected from EU
- Requires consent to collect data
- Privacy by design: Enforces privacy and security measures
- Gives rights such as: • right to be informed • right of access • right to rectification • right to erasure (right to be forgotten) • right to restrict processing • right to data portability • right to object • right in relation to automated decision making and profiling.
- Also known as ISO/IEC 15408
- Standard for computer security certification
- Tests to evaluate vendor claims of security about its products
- Four aspects to the of evaluation
- TOE: the system being tested
- ST (security target): he documentation describing the TOE and requirements)
- PP (protection profile)
- The requirements for the type of product being tested)
- The evaluation assurance level (EAL, the rating level, ranked from 1 to 7).
- RFC 1918: Private IP Standard
- RFC 3227: Collecting and storing data
- CAN-SPAM act: Email marketing
- GLBA
- Gramm-Leach-Bliley Act
- Requires financial institutions to take steps to protect customer information
- FERPA: Education Records
CEH-in-bullet-points/chapters/01-introduction/laws-standards-and-regulations.md at master · undergroundwires/CEH-in-bullet-points ·
Penetration testing
a. Penetration Testing
- Simulating of an security attack to
- discover vulnerabilities (and document)
- evaluate the security
- Detailed analysis of weaknesses in design, technical flaws, and vulnerabilities in organizations information security.
- E.g. • phishing • testing authentication using dictionaries • test if router is using an obsolete OS
- Identify threats
- Reduce security expenses
- E.g. you can recommend cheaper router and switches that’ll be enough for their capacity and still secure.
- ROSI = Return on security investment
- E.g. you’ll save company for 100% payback if they implement anti-junk system and junk e-mails cost more to the company.
- Provide complete security assessment
- Maintain industry standards and regulations
- Follow best practices
- Test security controls
- Improve current security infrastructure
- Pay particular attention to severe vulnerabilities
- E.g. explain what one single vulnerability can lead to what kind of damage.
- Prepare steps for preventing exploitations
- Test network security devices
- Defining the penetration test parameters
- States what pen-tester can do and cannot do.
- Have both signed.
- Engaging skilled penetration testers
- Following non-disclosure agreement
- Companies don’t want to work with someone with bad reputation, e.g. who broke NDA before.
- Selecting appropriate tests
- Done by the company and the pen-tester together
- Find cost/benefit ratio of tests
- Using and following a methodology
- 💡 Good to test for all known vulnerabilities to save time and make documentation easier.
- Documenting the results of the test
- Creating a final report
- Compliance = Inspects if an organization is following security standards and policies.
- E.g. interviewing staff, vulnerability scans, reviewing access controls, analyzing physical access.
- Often blue/red teaming approach is used by penetration testers.
- Finds the vulnerabilities in the network
- Will not state if they’re exploitable, nor the potential harm
- Includes both security audit + vulnerability assessment
- Discovers vulnerabilities in a system and evaluates its security
- Demonstrates how attackers can exploit the identified vulnerabilities.
- Tells you what measures should be taken to prevent the vulnerabilities.
- Two teams in company, or sometimes outside of the company who battles against each other.
- Similar to capture the flag contest, red is aggressor, blue protects.
- More cost-efficient then hiring an external company to do full penetration testing.
- Blue team
- Defender: Detects attackers (red team) and predict possible attacks.
- Has full access to the system to analyze the security.
- Red team
- Attacker: Finds vulnerabilities in the system and penetrates to examine what real attackers could do.
- Has no access to the system
- Purple team
- Both worlds
- Both attacks and also repairs/suggests improvements
- Consists of white box, black box and grey box testing.
- 💡 The darker the box is the more credible test results and the higher the costs are. As going from nothing to something as opposed to something to nothing would simulate real-world hacks but would take more time.
- 📝 Each type can be
- Announced vs. Unannounced
- Announced testing
- IT team are aware of security being tested.
- Often it occurs when testing a specific segment where IT admins give you access to test different components.
- Unannounced testing
- IT team is unaware of the security being tested
- Announced testing
- Internal vs External
- Internal
- Targets assets within an corporate network
- External
- Targets internet-facing assets such as web, mail and FTP servers.
- Internal
- Announced vs. Unannounced
- Also called zero-knowledge Testing, blackbox testing or black-box testing
- 📝 Testers have very little information about the client’s infrastructure.
- The goal is to simulate an external hacking or cyber warfare attack.
- provides a very realistic scenario for testing of the defenses
- Can be costlier as it takes much more time to conduct.
- Tester has little information to none about target.
- Target itself (e.g. system administrator) knows about the test and its scope.
- Demonstrates what a real attacker would do.
- Also called zero-knowledge approach
- Neither the pen-tester nor the target knows anything about each other.
- Good & reliable results
- Most difficult, time-consuming and expensive to perform.
- Also called greybox testing, grey-box testing, gray box testing, graybox testing, gray-box testing
- 📝 Tester has partial knowledge i.e. knowledge of the internal workings is limited.
- Combination of black box and white box testing.
- Helps to reduce the cost of the test by gaining knowledge that would be harder to gain otherwise.
- Also called Complete-Knowledge Testing, whitebox testing or white-box testing
- 📝 Tester knows the company inside out
- fully aware of the network, infrastructure policies.
- e.g. ap of the subnets, ruling list of firewalls, intrusion detection system details.
- Cost-effective and can be good when testing a single component
- Approach to attempt to find vulnerabilities in the system’s security mechanisms.
- Used during e.g. security audit, vulnerability assessment and penetration test.
- 💡 Using a good security testing methodology provides a repeatable framework
- Usually done by security companies who offer pen testing services and as such are kept confidential.
- Includes
- IBM
- Good for mid-sized companies
- Gives fast result without much effort
- McAfee Foundstone
- Used mainly in enterprises.
- Anything that’s custom not generic has big chance of slipping through
- EC-Council LPT
- Auditing framework
- IBM
- Publicly available and can be used by anyone
- Online community, produces freely-available articles, methodologies, documentation, tools, and technologies in the field of web application security
- Produces Top 10 lists of the most common vulnerabilities and how to fix them.
- Good for developers and system architects (anyone working with coding/application)
- Open-source security testing methodology manual
- Standard set of penetration testing tests
- Attempt to standardize pen-testing and making consistent
- Defines three types of compliance:
- Contractual: requirements enforced by an industry or non-government group.
- Legislative: regulations enforced by the government.
- Standards based: actions that are recommended and must be adhered to in order to be certified by a group.
- Like an instruction manual “how to conduct a pen-test”
- Federal technology agency
- Applies a lot of standards to comply.
- They do much research and publish most.
- E.g. • NIST SP 800-53 • NIST definition of cloud computing
CEH-in-bullet-points/chapters/01-introduction/penetration-testing.md at master · undergroundwires/CEH-in-bullet-points · GitHub
b. Penetration testing phases
- Planning
- Preparation
- Reconnaissance
- Ethical hackers proceed only after an agreement is in place—to protect both parties.
- Non-disclosure agreement
- Also known as NDA
- 📝 Prohibits you from sharing your findings
- Penetration testing contract
- Should include all information and requirements that the penetration tester needs.
- Ensures the tester won’t be sued or prosecuted and can legally perform an attack.
- as damage can incur during penetration testing
- 💡 Good idea to go through those with a lawyer.
- Formal document that gives permission to perform a penetration test.
- 📝 Guideline for testers and as such should clearly state what is and isn’t allowed
- E.g. which IP addresses should be tested, which hosts are not to be tested, which techniques, time frame when test can take place etc. . E.g. ok with SQL injection tests and brute force attacks but no DDoS attacks to not have service disruption or to not have network costs.
- 🤗 Used also by armies, e.g. US army cannot fire on somebody unless they’re firing on them.
- Pen-tester needs to understand the client’s requirements.
- 💡 Also make sure client understands that themselves as well as they may not understand what they’re asking you to do
- Important for testers reputation and clients satisfaction.
- 💡 Create checklists.
- Make suggestions
- Ensure everything is clear without loose ends
- Best to be clear as changing something during testing is not good as it would postpone the deadline and cost more for the client.
- Ensures that requirements are fulfilled, and objectives are met.
- Objectives should be determined first e.g.
- Deliverables: Different reports and often a final report where all results are placed and documented.
- Functionality: Verifies the system you’re pen-testing is working as intended
- Technical structure: Design of the whole project
- Data definition
- Defines areas/parts of the system that’ll be tested e.g.:
- Network security
- E.g. check routers for faulty configurations, outdated operative systems.
- System software security
- Client-side application security
- Client-side to server-side communication security
- Server-side application security
- Document security
- Physical security
- E.g. how are people tracked? How is access granted and controlled? How are the access policies enforced?
- Application communication security
- Dumpster diving
- Insiders
- Sabotage intruder confusion
- Intrusion detection
- Intrusion response
- Social engineering
- Network security
- To goal is to gather as much information about the target as possible
- Information is used to map out the target’s network and plan the attack.
- See also Reconnaissance | Hacking stages and Footprinting
- Information can include
- Physical and logical locations
- e.g. for servers
- Analog connections
- E.g. phones, GSM networks
- 🤗 You can create your own cellphone tower and take over their connections as you’ll have the strongest signal.
- Contact information
- E.g. sitting in a near coffee to take photos and take names. You can then look at their contact information in list of employees (if publicly available somewhere). They become suspectable to social engineering.
- Information about other organizations
- 🤗 E.g. You can come with a rack suit to fix air-conditioning devices and say “hey there’s a problem in air conditioning on floor 14” or “regular maintenance” or “one of your devices is due.”. A security personal mey escort you but he won’t watch everything carefully, you can place a Raspberry Pie and connect it to electricity. Refer to the following video: Sneaking in EVERYWHERE for FREE (Yellow Vest Experiment)
- Stupid and simple. Something too complex has higher risks of not working as the dumber it is, the simple it is, it’ll probably work.
- 🤗 E.g. You can come with a rack suit to fix air-conditioning devices and say “hey there’s a problem in air conditioning on floor 14” or “regular maintenance” or “one of your devices is due.”. A security personal mey escort you but he won’t watch everything carefully, you can place a Raspberry Pie and connect it to electricity. Refer to the following video: Sneaking in EVERYWHERE for FREE (Yellow Vest Experiment)
- Physical and logical locations
- Phase where target gets compromised.
- Information gathered in the previous one is used to carry out an attack.
- Steps
- Trying to bypass IDS (Intrusion Detection System) and firewall
- A way is to use social engineering to test out the boundaries and find a way into the system.
- Firewall testing techniques include
- ICMP probes
- Checking access control
- Evaluating protocol filtering rules
- Evaluating IDS
- Probing allow you to see what the perimeter detects & drops & won’t detect
- You can craft own packets and see the reactions
- e.g. by modifying source/destination IPs
- E.g. check if certain port always drops, maybe port is open but only goes through the VPN where employees access network.
- You can craft own packets and see the reactions
- Figure out what devices are running under perimeter to select as a target.
- Enumerate devices collecting:
- ID of the device
- Description
- Hostname
- Physical location
- IP and MAC address
- 🤗 MAC address lets you know who the manufacturer is. Manufacturer information can give you idea of what kind of OS they run. You might get what devices they are running and how they are shipped. You can go to the distributor and put some physical keyloggers or sniffers e.g. a Raspberry Pi into a large router/switch.
- By cross checking them later again, it is possible to identify unauthorized devices.
- Enumerate devices collecting:
- Done after scanning and penetrating of the perimeter and selecting a target machine/device
- Involves vulnerability scans to find vulnerabilities which can be later exploited
- 📝 Includes:
- Active probing assaults
- Scanning the network and gathering more information
- Running vulnerability scans
- Completing vulnerability scans to see what vulnerabilities that the target has.
- Attempt to access services and obtain data
- Trusted systems and trusted process assessment
- Trying to access the resources on the system using the credentials obtained during the information gathering process
- E.g. using credentials that you have obtained through social engineering or general research of the company/system
- You attempt to access and extract as much as data as you can
- Pick-locking: try to unlock it in every possible way
- Active probing assaults
c. Privilege escalation
- 📝 Done once the access to the system is granted
- Goal is to grant elevated access.
- Techniques include
- Password crackers
- E.g. bruteforce, dictionary-based attack
- Exploit vulnerabilities in a code e.g.
- Poorly written security policies
- False code in the code / applications
- Web app version is not updated, there’s a vulnerability in this version
- Use flaws in a system e.g. older version of OS.
- Trojans
- Social engineering
- E.g. you realized that there’s no strict policy regarding e-mails. You send an e-mail for phishing scheme, gain more information when the person clicks on that link, you can then execute arbitrary code if e-mail client is old (unlikely).
- E.g. phone-call and ask what you need: works way more than it should
- Password crackers
- 🤗 A lot of companies have state-of-the-art perimeter
- inside perimeter they have very old equipment and OS
- they don’t emphasize much on security interior as they do in external
- once you pass the perimeter, you’re more likely to find something inside
- Defenses include
- Running services with the least privileged accounts
- Implementing multi-factor authentication/authorization
- Involves compromising the system with code.
- Techniques include
- DoS, DDoS attacks
- buffer overflows to execute arbitrary code.
- using viruses, trojans, rootkits
- installing backdoors
- Retract means being able to exit without leaving any traces behind
- Traces left behind can cause suspicions and in effect vulnerablities would be patched and you cannot gain access to the target machine back using the same method.
- Delete all the logs that indicates you existed to ensure persistent remote access.
- Good idea is to figure out their antiviruses, and test your execution in a VM with same antivirus and security measures to not get detected by a random scan.
- If alarm is raised, you might be detected, put it in the report and result of whether the flag was investigated.
- The tester restores the system to the pretest state.
- ❗Don’t leave your stuff be it accidentally or on purpose as it breaks the law either way.
- Examples
- Delete any malware/rootkit installed
- Recover all files that were deleted
- Reverse any elevated privileges.
- Restore network settings to its original state
- Remove created vulnerabilities and exploits
- Examples
- Documentation / clear log of activities, results and security flaws.
CEH-