Eikma Rizal Saharuddin

Docs Machine Learning 101

View My GitHub Profile

Progress Status

Artificial Intelligence vs Machine Learning vs Deep Learning

Knowledge needed to master in this area

Mathematics (http://www.deeplearningbook.org/)

Type of Machine Learning Algorithms

alt text

TERMINOLOGY

Arthur Samuel: Field of study that gives computers the ability to learn without being explicitly programmed. Tom Mitchell: A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.

List of Machine Learning Algorithms (Examples)

Linear Regression

Finding straight line or hyperplane that best fits to set of points

Multi Feature Variables in Linear Regression

Scaling and Mean Normalization

Alt Text

Comparison Gradient Descent and Normal Equation

Reducing loss

As we train a model reducing loss will give best trained model. Stochastic Gradient Descent involves one example at a time while for Mini-Batch Gradient Descent batches 10-1000

Type of Training models

What is Regression Analysis?

Regression Analysis investigates the relationship between predictor (independent variable) and target (dependent variable) where it is predictive modelling technique. Examples including time series, forecasting as well as finding casual effects relationship between variables.

Linear Regression

To estimate real values based on continous variables (using regression line represents by linear equation y=ax+b; where y=dependent variable, a=slope, x=independent variable, b=intercept)

Type of Linear Regression

Python code for Linear Regression

#Import Library
#Import other necessary libraries like pandas, numpy...
from sklearn import linear_model
#Load Train and Test datasets
#Identify feature and response variable(s) and values must be numeric and numpy arrays
x_train=input_variables_values_training_datasets
y_train=target_variables_values_training_datasets
x_test=input_variables_values_test_datasets
# Create linear regression object
linear = linear_model.LinearRegression()
# Train the model using the training sets and check score
linear.fit(x_train, y_train)
linear.score(x_train, y_train)
#Equation coefficient and Intercept
print('Coefficient: \n', linear.coef_)
print('Intercept: \n', linear.intercept_)
#Predict Output
predicted= linear.predict(x_test)

R code for Linear Regression

#Load Train and Test datasets
#Identify feature and response variable(s) and values must be numeric and numpy arrays
x_train <- input_variables_values_training_datasets
y_train <- target_variables_values_training_datasets
x_test <- input_variables_values_test_datasets
x <- cbind(x_train,y_train)
# Train the model using the training sets and check score
linear <- lm(y_train ~ ., data = x)
summary(linear)
#Predict Output
predicted= predict(linear,x_test) 

Other type of Regressions

Logistic Regression

Decision Tree

SVM

Naive Bayes

kNN

K-Means

Random Forest

Dimension Reduction Algorithm

Gradient Boosting Algorithms:

K-Means clustering

K-Mean clustering use a method of vector quantization for (cluster analysis). Cluster analysis is where grouping task is among similarity to each other for same group. It is an unsupervised learning. alt text

Steps in K-Means

Determine the best value for K

Using Elbow method, whithin a range of values of K, example (1 to 10) then calculate the sum of squared errors. alt text Calculation for sum of square errors alt text

CREDIT/REFERENCES

Blog

r-bloggers-K-Means

Online Course

Machine Learning Crash Course

Website

Common-machine-learning-algorithms

Github

Siraj Raval

Big Data

Three major sources of big data

Characteristics of Big Data

Big Data Engineering

Hadoop Ecosystem

Big Data Ecosystem

Hadoop Command Lines

Hadoop Components

Data Lakes

Data models


Information Security

Progress Status

Android App Security

Android provides a sandboxed app execute env. A customized embedded Linux system interacts with the phone hardware and an off-processor cellular radio.

Java compiler creates JVM bytecode, the Dalvik dx compiler consumes the .class files, recompiles them to Dalvik bytecode and writes the app into single.dex file.

The process consists of translation, reconstruction and interpretation of 3 basic elements of the app
the constant pools, class definitions and data segment.

Constant pool: constant (references to other classes,method names, numerical constant) Class definitions: basic infos(access flags, class names) Data segment: method code executed by target VM number of DVM registers used, local variable table, and operand stack sizes), class and instance variable

Risks

Aims

Hypothesis

Computer science terms

Differences of JVM and DVM

Ded decompiler

Development of Android Apk

Prerequisites

Wireless Commands

Android hacking

Security Updates

Nmap and Wireshark for Network Scanning

Saving result

Windows CMD /Netstat/ ping /tracert/ ARP

Creating Windows Payload with Msfvenom

AlienVault/ DVWA/ OSForensics/ ProDiscover Basic

References

Terminologies

Penetration Test

Set of methods and procedures for testing or protecing security of an organization.

Vulnerability Assessments

To check for vulnerabilities and document accordingly.

Rules of Engagement

Phases in Penetration Testing (With tools)

Security Analyst Tracks

Auditing and Incident Response

Security Threat

Categories

Mitigate escalation of privilege threats

Mitigate brute force attacks

Slowloris attack (Dos attack //An attack that renders systems unresponsive)

Causes lead to security misconfiguration threats

# Spoofing

# Integrity and Tampering Threats

# Authentication and Non-repudiation

# Information Privacy and Confidentiality

# Nmap

# Network IDS

# Host IDS

# IDS with Snort

# IDS with Bro

# Evading IDS with Nmap //-n skipping DNS resolution

# Brute force analysis

# Nmap script with its test

# User account discovery

# Firewall

# VPN

# Penetration Testing

# Type of PenTest

# Buffer Overflow Exploits ## Prevention

Privilege Escalation Attacks

Client- side Attacks

Incident Response Stages

  1. Preparation
  2. Identification
  3. Containment
  4. Eradication
  5. Recovery
  6. Lessons Learned

Tools in Incident Respone

OODA Loop (Observe, Orient, Decode, Act)

Malware

Antimalware

Security awareness

Digital forensics hardwares

Digital forensics softwares

Android tools

iOS Tools

Reference: https://www.practice-labs.com/

Nmap

Hping

Nslookup

Setup Honeypot

Penetration Testing

Cyber attack

Scanning tools

Credential testing tools

Contact Types

Resources

Rules of engagement

Compliance-based Assessments

Google Hacking

Harvester

Recon-ng

Wireless

EFS

Bitlocker

fdisk -l

apt-get install cryptsetup cryptsetup -y -v luksFormat /dev/sdb cryptsetup -v status mkfs.ext4 unmount cryptsetup luksClose cyrptsetup luksOpen

Hashing

SSL

Configuration Management Process

Server side attack

client side attack

Security Principle

Incident Response

Access control concept

Networking

Ports

Type of threats

Network design

Data security

Cloud computing

ISO/IEC 27001:2022

ISO/IEC 27002:2022

Risk Management Process ISO 27005:2022

Types of risks

RMF NIST

Vulnerability Management Process

User Account Management

Structure of SLA

Mitigation

DLP

Endpoint DLP policy

Endpoint DLP implementation

Configure settings for endpoint DLP

Deploy MS Purview browser extension

Enforce policies actions

DLP alerting and monitoring

DLP alert lifecycle

  1. Trigger
  2. Notify
  3. Triage
  4. Investigate
  5. Remediate
  6. Tune

DLP policies in MS Purview

Implement and manage MS Purview Insider Risk Management

Types of insider risks

Insider Risk Management Process

Plan for Insider Risk Management

Prepare for Insider Risk Management

Insider Risk Management workflow

Reports in Insider Risk Management

Adaptive protection

Configure Adaptive protection

Protect data in AI environment

Retention and data lifecycle

Threat protection with MS Defender XDR

Attack Chain Models

-MITRE ATT&CK Framework (Reconnaissance, Weaponization, Delivery, Exploitation, Installation, Command and Control, Lateral Movement, Action on the Objective)

Data Protection

Ms Purview Compliance Solutions

image

ISO/IEC 27001:2022 Lead Auditor

PDCA lifecycle

Structure ISO 27001

Executing the Risk Assessment

Statement of Applicability

Planning internal audit

Step 1: Specify audit scope Step 2: Set the Internal Audit Schedule Step 3: Select an auditor based on competence & impartiality Step 4: Review and approve the audit program Step 5: Execute Internal Audit

Core Board Responsibility

Common Board Questions

CISSP Notes

Domain 1: Security and Risk Management Due Diligence - maintain due care Due Care - prudent man rule

Domain 2: Asset Security Sata lifecycle (Create, store, use, share, archive, destroy) The data lifecycle (Creation, Classification, Storage, Usage, Archive, Destruction) - Domain 7

Data classification: Class 0, 1, 2, 3 public, sensitive, private, confidential - Non-Gov/public unclassified, confidential, secret, top secret - Gov

Data Security Controls Marking, labelling, handling, classification Data handling Data destruction (erasing, clearing/overwriting, purging, degaussing, destruction) Record retention Tape backup security

Domain 3: Security Architecture & Engineering Security Defaults

Security models (Biba, Star Model, Bell-LaPadula) Security capabilities (TPM, encryption/decryption)

Cryptanalytic attacks Secure defaults Fail securely Trust but verify

Privacy by design 7 principles from IAPP

Security Model- To determine how security will be implemented, which subjects can access the system, and which objects will have access to.

State Machine Model, Information Flow Model (Biba &Bell-LaPadula), Non-Interference Model, Lattice-Based Model, Clark-Wilson, Take Grant Model, Brewer and Nash Model, Graham-Denning Model

Dedicated Mode, Multilevel Mode, System High Mode, Compartmented Mode

Common Criteria (ISO-IEC 15408), TCSEC, ITSEC

Common Criteria -Description of Assets -Identification of Threats -Analysis & Rating of Threats -Determination of Security Objectives -Selection of Security Functional Requirements

Covert Channels: Covert timing, covert storage

MAC, DAC, Non-DAC, Rule-based access control

Hierarchical environment, compartmentalized environment, hybrid environment

Techniques for ensuring CIA

Memory types (EPROM = UVEPROM, EEPROM), flash memory Storage (Primary, secondary (removable media), random access storage, sequential access storage) Hypervisor (Type I hypervisor, Type II)

CASB, time-of-check-to-time-of-use

Functional order of security controls Deterrence, denial, detection, delay

Physical security controls Administrative, logical, physical

Domain 4 Micro-segmentation (SDN, VXLAN, SD-Wan, Encapsulation) Wireless (Li-fi, Zigbee, satellite) Cellular Networks

CCMP, FCoE, iSCSI EAP, PEAP, LEAP

Stateless, stateful Application, host-based, virtual

Bastion Host, Screened Host

Teardrop Attack, Fraggle Attack, Land Attack RADIUS, TACACS+, Diameter kerberos

Need to know, Least Privilege (Just-in-Time), Separation of Duties and Responsibilities

Gait Analysis

SAML, Oauth 2.0, OpenID

Discretionary Access Control, Role Based Access Control, Rule-based access control, Attribute Based Access Control, Mandatory Access Control

Dictionary attacks, Brute force, Spoofed logon screens, sniffer attacks, spoofing attacks, social engineering, phishing, whaling, vishing, Access aggregation, Tempest, white noise

War dialing, sniffing, eavesdropping, dumpster diving, social engineering

Collusion, separation of duties, job rotation

Sampling, Statistical sampling, clipping

patch , vulnerability, change, configuration management

Military &intelligence, Business, Financial, Terrorist, Grudge, Thrill attacks

BCP steps: Project scope & planning Business impact assessment Continuity planning Approval & implementation

read-throught test, structured walk-through, simulation test, parallel test, full interruption test

electronic vaulting, remote journaling, remote mirroring

SW-CMM

File, service, boot sector, macro infection

CISSP why will you will pass cissp kelly destination cert mind map

Domain 1 Security and risk management

The canons: Protect society Act honorably provide deligent Protect prefessional

5 pilars IS CIA+ Authenticity , non-repudation

Sec control framework ISO 2700, PCI DSS, NIST, FedRAMP, Cobit, SABSA

Policy-standards-guidelines-procedures

Mandates, standards, sompliance, audits

GDPR lawfulness, purpose ,imitation, data minimization, accuracy, storage limitation, integrity & confidentiality

Copyright 70 years valid patent 20 years trademarks 10 years

investigation type Admininstrative, civic, regulator, criminal, industry standard

CS Framework ISO 27001

Risk Framework nist sp 800-37, coso, isaca risk

BIA Methods Survey, financial audit, customer response, industry standard.best practice

NDA/NCA

NIST Cybersecurity Framework Identify, protect, detect, respond, recover

Asset-based, outcome based & process based, vulnerabilities based, threat based

mitigate, avoid, transfer, accept risk

ALE= AROSLE SLE=AVEF

Cost benefit analysis CBA = MITIGATED RISK (ALE before contol-after control)-COST OF CONTROL

3rd assessment & monitor governance review, site security review, foreman security audit, pentest

Domain 2 CURD creating, updating, reading, deleting

Data classify & category, data access, data security, data retention, data disposal, data encryption, appropriate use of data

unrestricted public data, low sensitivity, moderately restricted, highly restricted

IT Asset Management Life Cycle Data security life cycle Data life cycle

GDPR: subject, controller, processor, dpo Compliance: data steward, data custodian, data owner

EOL policy NIST SP 800-30

CASB - enforce enterprise security policies reagrding data and information access

Scoping- removes general baseline , tailoring - alters general baseline

Domain 3 Fail-safe, Fail-secure, Fail open, Fail-close

keep it simple, trust but verify, zero trust, privacy by design, fail securely

Secure Access Service Edge SASE

security model Brewer & nash, clark-wilson, graham-denning, harrison, ruzzo, ullman

Enabling process

The ring model: software perspective ring 0: OS & security kernel ring 1: device drivers ring 2: system utilities ring 3: applications

Security architecture

Client-based system, server-based system, database system, industrial control system (air gapped network, jumpbox, perdue model), embedded system, iot, distributed system, virtualized system (host escape, guest escape - vm escape), microservices, containerization, serverless architecture, hpc system, edge & fog computing architecture

symmetric vs assymmetric quantum cryptography steganography - null chiper

Hashing digital cert x.509

Ciphertext-only attack, knowm plaintext attack, chosen ciphertest attack, linear, cryptanalysis, differential cryptianalysis, pass the hash, kerberos exploitation, mitm, side channel attack, fault analysis, probing, replay attack, algebraic attack, rainbow attack, frequescy analysis, birthday attack, factoring attack, dictionary attack, attcaking the random number generator, temporary files attack

3-2-1 rule

Domain 4 TCP/IP ISO 7 layer

Physical layer

Amplifier, repeater (remove noise), twisted pair wiring Broadband Wireless Access IEEE 802.16 Zigbee IEEE 802.15.4, low-power devices, low-data-rate encrypted traffic

Cybesecurity kill chain CMM Model

Anycast, geocast, logical addressing CIDR IPV4 - CLass a,b,c,d,e

Application delivery platform (ADP)

Routing protocols Distance-vector protocol

Secure protocols- IP sec, AH, ESP, SAs

Transport mode- encrypt only payload Tunnel mode- encrypt entire

802.1X PNAC

Well known ports(0-1023) registered ports

Domain 5 IAM Administration ICAM, sso, federated identity management

rbac hybrid & full

rule based access control attribute access control risk based access control

RADIUS, TACACS+, LDAP, SAML, Kerberos OpenID, OAuth

Testing SAST, DAST, SCA, IAST, Vulnerability assessments, pentest, red teaming, bug bounty programs, threat modeling

pdca cycle Project zero vulnerabilities Equities Process (VEP)

Evidence

Change management Configuration, vulnerability, patch management

NIST Computer Security Incident Hnadling Lifecycle Preparation, detection & analysis, containment, eradication and recovery, post-incident activity

Backup Full, incremental, differential raid 0, 1 5, 6, 10 bcdr

Domain 8 Waterfall, agile

Maturation model

Data masking, data obsfuscation, pseudonymization, anonymization, tokenization

ACID in DBMS