Concepts For Interview
Concepts For Interview
FOR
INTERVIEW
This material is only for basic reference and candidates need to
explore deeper about the mentioned topics and need to self-explore
more topics if required for interview.
The client machine sends a request to the local name server (Resolver Server), which, if
the root does not find the address in its database, sends a request to the root name server,
which in turn, will route the query to a top-level domain (TLD) or authoritative name
server.
The root name server can also contain some host Name to IP address mappings.
The Top-level domain (TLD) server always knows who the authoritative name server is.
So finally, the IP address is returned to the local name server which in turn returns the IP
address to the host.
This time the Resolver server stores the Domain name with the IP Address for faster
results next time.
Source:
https://www.youtube.com/watch?v=mpQZVYPuDGU
https://www.youtube.com/watch?v=JkEYOt08-rU ( deeper explanation)
https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/
DHCP
ABOUT DHCP:
Dynamic Host Configuration Protocol(DHCP) is an application layer protocol which is used
to provide:
DORA PROCESS:
what happens when DHCP client requests an IP address from DHCP Server?
There are some messages which are exchanged between the DHCP Server and Client. This
process is divided in to four steps
1. DHCP DISCOVER : * When a DHCP client first boots up, it broadcasts a DHCP Discover
message. This message is initiated from DHCP Client to DHCP Server, to find the DHCP server
on the local network
2. DHCP OFFER : If a DHCP server exists on the local segment, it will respond with a DHCP
offer. This offer message is From DHCP Server to DHCP Client , to offer the IP Parameters,
which contains IP address, subnet mask etc.
3. DHCP REQUEST: * Once the client receives the offer, it will respond with a DHCP
Request, indicating that it will accept the offered protocol information. * This message is from
DHCP Client to DHCP Server, giving a request to get the offered IP Parameters
4. DHCP ACK: Finally, the server responds with DHCP Ack, acknowledging the client
acceptance of offered protocol information This message is from DHCP server to DHCP Client,
giving confirmation to use the the offered IP parameters. This process is also known as DORA
process. DHCP is a UDP service. Uses two UDP port numbers for its operations DHCP Server
uses the UDP port 67 and DHCP client uses UDP port 68.
Use of ports number prevents an application from getting a message from a completely different
protocol. If the client and server are on different subnets, well a DHCP Helper or DHCP Relay
Agent must be used in this case. Other than dynamically assigning IP addresses to client
machines DHCP also has the ability to provide various other interesting parameters or DHCP
options to client machines, like time zone information, boot arguments/paths, NTP servers, static
routes, host name of the client, very useful for IoT and any device without user.
Source : https://www.youtube.com/watch?v=kS42C3vqFco
.
.
.
.
.
.
.
.
.
IMPORTANT PORT
Hub
In the context of networking, a hub is a hardware device that transfers communication data. A
hub transmits data packets (frames) to all devices on a network, regardless of whether the data
packet contains any MAC addresses or not.
A hub has many ports and a computer which intends to be connected to the network is plugged
into one of these ports. When a data frame arrives at a port, the hub broadcasts it to every other
port, without considering whether it is destined for a particular destination or not. So, hubs can
create network congestion.
A switch varies from a hub in that it keeps track of the MAC addresses of all connected devices.
As a result, a switch can tell which device or system is plugged into which port. When a data
packet is received, the switch understands exactly which port it should be sent to.
A 10/100 Mbps switch, unlike a hub, will distribute the full 10/100 Mbps to each of its ports,
ensuring that users always have access to the maximum bandwidth – a significant benefit of a
switch over a hub.
Network hubs, passive, intelligent, and switching hubs are all standard hubs used in networking.
Network Hubs − These are popular network device connection points that connect parts
of a LAN (local area network) and may contain several ports – an interface for
connecting network devices, including printers, storage devices, workstations, and
servers. A data packet arriving at one Hub's port may be replicated to other ports,
allowing the data packet to be accessed by all network segments.
Passive Hubs − Passive Hubs act as conduits or channels for data to travel from one
device or network segment.
Intelligent Hubs − Also called managed hubs, allow system administrators to monitor
data flow and configure each port, allowing them to determine which devices or network
segments are connected to each port. Some ports may be left open even if there is no
connection.
Switching Hubs − These hubs are responsible for reading the properties of each data
unit. After that, the data is transmitted to the proper or intended port.
Switch
A switch is a networking device, which provides the facility to share the information & resources
by connecting different network devices, such as computers, printers, and servers, within a small
business network.
Types of Switch
There are mainly two types of switches in the network, which are given below:
o Unmanaged Switches
The unmanaged switches are mainly used for basic connectivity. These are mostly used
in small networks or wherever only few more ports are required, such as at home, in a
lab, or in a conference room. In unmanaged switches, there is no requirement for any
configuration, which means by just plugging in, they will work.
o Managed Switches
Managed switches are more secure than unmanaged switch, and provide other features
and flexibility because we can easily configure them to custom-fit our network. Hence,
we can have the greater control, and can also better protect our network and improve
service quality for those who access the network.
Working of switch:
When a device or computer sends an IP packet to another device, then switch put the IP packet
with source MAC address and destination MAC address, and encapsulate it with a Frame, and
then send it to another device.
When Frame reaches the destination device, it is stripped, and the device gets the IP packets and
reaches only that device, which matches the entered destination MAC address.
Advantages of Switch
o It enhances the available bandwidth of the network.
o It can be directly connected to the workstations or devices.
o Enhances the performance of the network.
o Networks with switches have less frame collision, and it is because switches develop the
collision domain for each network.
o It helps in reducing the workload on the individual host such as PCs.
ROUTER
o Within a home or office, we have various networked devices such as PC, tablets, printers,
etc., and with the router, these devices can be connected to the internet and form a
network. A router first connects the modem to other devices to allow communication
between these devices and the internet.
o Router routes/transmit the data packets with the defined IP address from one network to
another or within a network. It does it by providing a local IP address to each device over
the internet; it ensures the right destination so that data reach the right place rather than
lost within the network.
o It finds out the best and fastest path and then sends data packets from that path to the
devices connected within the network.
o It works similar to the delivery package with a defined address to reach the right recipient
only.
Types of Router
There are mainly two types of the router, which are given below:
1. Wireless Router
o Wireless routers are the most commonly used routers in offices and homes as they don't
need any wire or cable to connect with networking devices.
o It provides a secure connection, and only authenticated users can access the network
using the id & password.
o Using wireless router, internet can be accessed by the n number of users within the
specified range.
Advantages of Router
o The wireless routers are mostly used that enable most networking devices to connect
easily at any time, without the worry of a bunch of wires.
o It can connect with the different architecture of the network, such as Ethernet cable, Wi-
fi, or WLAN.
o It provides highly secure network access with password protection.
o It reduces the network traffic with the help of the collision feature.
o It provides data packets to the correct destination with the best route using the routing
table and intelligence.
Difference between switch and router
Switch Router
It works on the data link layer of the OSI It works on the network layer of the OSI
model. model.
A switch cannot perform NAT or Network A router can perform Network Address
Address Translation. Translation.
The switch takes more time while making A router can take a routing decision much
complicated routing decisions. faster than a switch.
It sends information from one device to It sends information from one network to
another in the form of Frames (for L2 switch) another network in the form of data
and the form of packets (for L3 switch). packets.
Switches can only work with the wired Routers can work with both wired &
network. wireless networks.
Switches are available with different ports, A router contains two ports by default,
such as 8, 16, 24, 48, and 64. such as Fast Ethernet Port. But we can
also add the serial ports explicitly.
It uses the CAM (Content Addressable It uses the routing table to get the best
Memory) table for the source and route for the destination IP.
destination MAC address.
Important links:
https://www.javatpoint.com/switch-vs-router
https://www.tutorialspoint.com/difference-between-router-and-switch#
Difference between Hub and Switch
The following table highlights the major differences between a Hub and a Switch −
Objective The main objective of a Hub is to transmit A switch allows you to set up
the signal to a port, which will respond to and terminate connections as
where the signal was received. needed.
Layer Hubs operate at the Physical Layer. Switches function at the Data
Link Layer.
Collision There is only one collision domain in a In a Switch, each port has its
Domain Hub. own collision domain.
Transmission Hub uses half duplex transmission mode. Switch uses full duplex
Mode transmission mode.
Important links:
https://www.tutorialspoint.com/difference-between-hub-and-switch
https://www.youtube.com/watch?v=ck3gx9HB9-k (Broadcast domain & Collision
Domain Explained)
https://www.youtube.com/watch?v=jQerVWxOGMc
TCP Vs UDP:
Transmission control protocol User datagram
Basis (TCP) protocol (UDP)
There is no sequencing
Sequencing of data is a feature of of data in UDP. If the
Transmission Control Protocol order is required, it has
(TCP). this means that packets to be managed by the
Sequence arrive in order at the receiver. application layer.
There is no
retransmission of lost
packets in the User
Retransmission of lost packets is Datagram Protocol
Retransmission possible in TCP, but not in UDP. (UDP).
It’s a connectionless
Handshaking Uses handshakes such as SYN, protocol i.e. No
Techniques ACK, SYN-ACK handshake
UDP supports
Broadcasting TCP doesn’t support Broadcasting. Broadcasting.
UDP is used
by DNS, DHCP,
TCP is used by HTTP, TFTP, SNMP, RIP,
Protocols HTTPs, FTP, SMTP and Telnet. and VoIP.
Important link:
https://www.geeksforgeeks.org/differences-between-tcp-and-udp/
What is an IP Address?
The term IP Address is an acronym for Internet Protocol Address. An IP Address refers to the
address that assists a user in identifying a network connection. It also goes by the Logical
Address name provided to individual connections in the present network. An IP address lets us
understand and control the way in which various devices communicate on the Internet. It also
defines the specific behavior of various Internet routers.
Protocol Used You can retrieve a device attached You can retrieve a device
for Retrieval to the MAC address using the ARP attached to the IP address
protocol. using the RARP protocol.
Use The primary use of a MAC address The IP address, on the other
is to ensure the physical address of hand, defines a computer’s
a given device/ computer. logical address.
Alteration and This address does not alter or This address gets modified
Changes change with the passing time and depending on the change in
change of environment. environment and time.
Third-Party Any third party can find out a The IP address stays hidden
Access device’s MAC address. from display in front of any
third party.
Important Links:
https://byjus.com/gate/difference-between-mac-address-and-ip-address/#:~:text=The%20primary
%20use%20of%20a,defines%20a%20computer's%20logical%20address.&text=The%20MAC
%20address%20primarily%20operates,operates%20on%20the%20network%20layer.
Above we have seen for Subnet mask of 255.255.255.0 But what for subnet mask like for
example 255.255.224.0? Our next example lets us understand if a an Octet is partially occupied
how the Network and Host ID’s are determined.
Thus, we understand the importance of breaking a big network to subnetwork called subnetting.
11111111 and 00000000 are reserved. the first to identify the network and the last to be used as
the broadcast address. Thus, for hosts when a network is divided we will have two host less i.e.,
instead of 256 hosts we will have 254 and so on.
Classes of Subnet Mask
Source:
https://www.youtube.com/watch?v=s_Ntt6eTn94&t=831s
https://www.youtube.com/watch?v=AslJxRKgyeo&ab_channel=NETWORKINGPLUS
TCP DUMP
tcpdump prints the contents of network packets. It can read packets from a network
interface card or from a previously created saved packet file. tcpdump can write packets
to standard output or a file.
It is also possible to use tcpdump for the specific purpose of intercepting and displaying
the communications of another user or computer. A user with the necessary privileges on
a system acting as a router or gateway through which unencrypted traffic such as Telnet
or HTTP passes can use tcpdump to view login IDs, passwords, the URLs and content of
websites being viewed, or any other unencrypted information.
The user may optionally apply a BPF-based filter to limit the number of packets seen by
tcpdump; this renders the output more usable on networks with a high volume of traffic.
SOURCE:
https://en.wikipedia.org/wiki/Tcpdump#:~:text=tcpdump%20is%20a%20data
%2Dnetwork,license%2C%20tcpdump%20is%20free%20software
https://danielmiessler.com/study/tcpdump/
https://www.youtube.com/watch?v=e45Kt1IYdCI
https://en.wikipedia.org/wiki/Tcpdump#:~:text=tcpdump%20is%20a%20data
%2Dnetwork,license%2C%20tcpdump%20is%20free%20software.
Working of TLS:
The client connect to server (using TCP), the client will be something. The client sends number
of specification:
1. Version of SSL/TLS.
2. which cipher suites, compression method it wants to use.
The server checks what the highest SSL/TLS version is that is supported by them both, picks a
cipher suite from one of the clients options (if it supports one) and optionally picks a
compression method. After this the basic setup is done, the server provides its certificate. This
certificate must be trusted either by the client itself or a party that the client trusts. Having
verified the certificate and being certain this server really is who he claims to be (and not a man
in the middle), a key is exchanged. This can be a public key, “PreMasterSecret” or simply
nothing depending upon cipher suite.
Both the server and client can now compute the key for symmetric encryption. The handshake is
finished and the two hosts can communicate securely. To close a connection by finishing. TCP
connection both sides will know the connection was improperly terminated. The connection
cannot be compromised by this through, merely interrupted.
https://www.geeksforgeeks.org/transport-layer-security-tls/?ref=lbp
https://www.youtube.com/watch?v=AlE5X1NlHgg&t=656s (TLS 1.2 &1.3)
SSL
Secure Socket Layer (SSL) provides security to the data that is transferred between web browser
and server. SSL encrypts the link between a web server and a browser which ensures that all data
passed between them remain private and free from attack.
Secure Socket Layer Protocols:
SSL record protocol
Handshake protocol
Change-cipher spec protocol
Alert protocol
SSL Protocol Stack:
Alert Protocol:
This protocol is used to convey SSL-related alerts to the peer entity. Each message in this
protocol contains 2 bytes.
SSL (Secure Socket Layer) supports TLS (Transport Layer Security) does
the Fortezza algorithm. not support the Fortezza algorithm.
SSL (Secure Socket Layer) is the 3.0 TLS (Transport Layer Security) is the
version. 1.0 version.
SSL uses port to set up explicit TLS uses protocol to set up implicit
connection. connection.
SOURCE:
https://www.geeksforgeeks.org/difference-between-secure-socket-layer-ssl-and-transport-layer-
security-tls/
AD VALUE
An AD value is the trustworthiness of the source.
Routers assign an AD value to each source from the range 0 – 255. In this range, a
smaller number is considered more reliable than a bigger number.
For example, if a source has an AD value of 40, it will be considered more reliable than a
source that has an AD value of 50.
Routers assign the value 0 to the most reliable source and the value 255 to the most
unreliable source.
https://www.youtube.com/watch?v=ty4nNli7Mys
https://www.computernetworkingnotes.com/ccna-study-guide/administrative-distance-ad-
explained.html#:~:text=An%20AD%20value%20is%20the,reliable%20than%20a%20bigger
%20number.
https://www.geeksforgeeks.org/administrative-distance-ad-and-autonomous-system-as/
Active Directory
OWASP top 10
Broken access control-in which a user can access, modify, delete or perform actions outside
the limit of permissions provided for that user.
ex-
Bypassing access control checks by modifying the URL
Permitting viewing or editing someone else's account
acting as an admin when logged in as a user.
Force browsing to authenticated pages as an unauthenticated user or to privileged pages
as a standard user.
Preventions -
Except for public resources, deny by default all other sources
Report admin for repeated login failure logs
Cryptographic failure – this is vulnerability where security of data will fail and which
expose sensitive data to read a non-authorised user
ex-
data transmitted in clear text
any old or weak cryptographic algorithms or protocols used
weak crypto keys generated or re-used
Preventions -
using asymmetric encryption
Make sure to encrypt all sensitive data at rest.
Ensure up-to-date and strong standard algorithms, protocols, and keys are in use
Injection attack –in injection attack hacker injects a malicious code, quarry or command to
the web application to get unauthorised access.
ex-
Attack can happen when user supplied data like quarry, command or programme was not
validated, filtered or sanitised by application
Allowing user to execute command or quarry’s which are not in there limit of
permissions given to a particular user
Preventions -
Filtering, validating or sanitising in input data of a user to application
Not allowing a normal user to execute commands which are not in there permissions
Insecure design–in this attack developers, QA or security team fails to meet or evaluate
parameters of security during code design.
Preventions -
Restrict resource consumption by user or service
Check for possible critical vulnerabilities from frontend and backend at each tier of
system
Vulnerable and outdated components –using components with known vulnerability’s and
using old components which are not having patches
ex-
When we not to updates for given patches
If we are not aware of which version of software’s are using at client and server side
Preventions -
Keep software up to date
Remove unnecessary components which are not in use.
Software and data integrity failures –this include vulnerabilities of software and critical
data whose integrity was not verified.
ex-
Known vulnerabilities of software
When auto updated software’s are not tested
Preventions -
Use a software supply chain security tool to make sure that components do not have any
known vulnerabilities
Security logging and monitoring failure –this includes failure of logging, monitoring and
detection of vulnerable events.
ex-
When critical events not detected or not monitored properly
Preventions -
Make sure that logs will be in form of that can be easily understandable and using logs
can easily detect malicious activities
Make sure logging of critical events were not missing
Server side request forgery –this occurs when application is fetching remote resources
without validating users supplied URL.
ex-
Preventions –
Sanitize the URL or user supplied data
Important link:
https://owasp.org/www-project-top-ten/
FIREWALL
Firewall and Its Types:
Differences between Stateless and Stateful firewalls :
Stateless Packet Filtering Firewalls Stateful Packet Filtering Firewalls
3. Less secure than stateless firewalls. Stateful firewalls are more secure.
Faster than Stateful packet filtering Slower in speed when compared to Stateless
5. firewall. firewall.
3 Tier architecture
About Smart Console(SC GUI), Security Management Server(SMS) And Security
Gateway (SG):
Deployment Scenarios
1) Standalone
2) Distributed
(2) Is a SIC Connection that is established to connect the management server and security
gateway.
3) Management High Availability
4) Full High Availability
Cluster
As per TIER
Responsibility:
Firewall Blades:
Firewall blade – helps in access control by using applied policy’s and NAT rules on
security gateway
Identity awareness blade – it enables to create identity-based policies and also helps in
monitoring of all machines from single smart console.
Application control and URL filtering blade – it enables to create more granular
policies for a particular user or group to identify, block or limit the usage of application
and URL
IPS blades protects users from malware websites
Antibot blade – identifies the bot infected machines and block outbound communication
to the C&C sites to protect sensitive data
Anti virus – it protects from the network from malware attack like trojans, worms, virus,
ransomware
Threat emulation – it protects network from unknown threats in files which are
downloaded from internet or attached in emails. It detects these types of files and blocks
them from accessing
Threat extraction – it removes the malicious content from the file and provides clean
and safe file for users. By this helps in uninterested business flow
IDS - Intrusion Detection System:
Types of Intruders:
Masquerader: The category of individuals that are not authorized to use the system but still
exploit user’s privacy and confidential information by possessing techniques that give them
control over the system, such category of intruders is referred to as Masquerader. Masqueraders
are outsiders and hence they don’t have direct access to the system, their aim is to attack
unethically to steal data/ information.
Misfeasor: The category of individuals that are authorized to use the system, but misuse the
granted access and privilege. These are individuals that take undue advantage of the permissions
and access given to them, such category of intruders is referred to as Misfeasor. Misfeasors are
insiders and they have direct access to the system, which they aim to attack unethically for
stealing data/ information.
Important links:
https://www.youtube.com/watch?v=dfVAi87BSEs
https://www.geeksforgeeks.org/intrusion-detection-system-ids/?ref=lbp
https://www.geeksforgeeks.org/intruders-in-network-security/
Intrusion Prevention System is also known as Intrusion Detection and Prevention System. It is a
network security application that monitors network or system activities for malicious activity.
Major functions of intrusion prevention systems are to identify malicious activity, collect
information about this activity, report it and attempt to block or stop it.
IPS typically record information related to observed events, notify security administrators of
important observed events and produce reports. Many IPS can also respond to a detected threat
by attempting to prevent it from succeeding. They use various response techniques, which
involve the IPS stopping the attack itself, changing the security environment or changing the
attack’s content.
IPS
Technology Types of Malicious Scope per
Type Activity Detected Sensor Strengths
Multiple
network
Network, transport, and subnets Only IDPS which can
Network- application TCP/IP layer and groups analyze the widest range of
Based activity of hosts application protocols;
Signature-based detection:
Signature-based IPS operates packets in the network and compares with pre-built and
preordained attack patterns known as signatures.
Intrusion prevention systems are placed in-line and are able to actively prevent or block
intrusions that are detected.
IPS can take such actions as sending an alarm, dropping detected malicious packets,
resetting a connection or blocking traffic from the offending IP address.
IPS also can correct cyclic redundancy check (CRC) errors, defragment packet streams,
mitigate TCP sequencing issues and clean up unwanted transport and network layer
options.
IP-SEC:
Explanation:
All these components shown above are very important in order to provide the three main
services:
Confidentiality
Authentication
Integrity
1. Architecture: Architecture or IP Security Architecture covers the general concepts,
definitions, protocols, algorithms, and security requirements of IP Security technology.
2. ESP Protocol: ESP(Encapsulation Security Payload) provides a confidentiality service.
Encapsulation Security Payload is implemented in either two ways:
ESP with optional Authentication.
ESP with Authentication.
Packet Format:
Parameters:
1. Security Parameter Index (SPI): A 32-bit number that is chosen to uniquely identify a
particular SA for any connected device. The SPI is placed in AH or ESP datagrams and
thus links each secure datagram to the security association. It is used by the recipient of a
transmission so it knows what SA governs the datagram.
2. Security Protocol Identifier: Specifies whether this association is for AH or ESP for an
SA. If both are in use with this device they have separate SAs.
3. Sequence Number Counter: A 32-bit value used to generate the Sequence Number field
in AH or ESP headers.
Initially the sequence number is 0 as packets keep getting sent the value increases by 1
everytime. Hence its range begins from 0 to 232 -1 (4,294,967,295)
4. AH Information: Information related to Authentication algorithm, keys, key lifetimes,
and related parameters being used with AH (required for AH implementations).
5. ESP Information: Information related to Encryption and authentication algorithm, keys,
initialization values, key lifetimes, and related parameters being used with ESP (required
for ESP implementations).
6. Lifetime of This Security Association: A time interval or byte count after which an SA
must be replaced with a new SA (and new SPI) or terminated, plus an indication of which
of these actions should occur (required for all implementations).
7. IPSec Protocol Mode: The AH or ESP protocol can be implemented in Tunnel,
transport, or wildcard mode (required for all implementations).
Important Links:
https://www.geeksforgeeks.org/ipsec-protocols/?ref=rp
https://www.geeksforgeeks.org/ip-security-ipsec/
IPSec Mode
Transport Mode:
In this mode the IPSec Header(AH or ESP) is Inserted between the IP Header and the
Payload of the packet. Thus, only the payload gets Encrypted but not the IP Header.
https://www.youtube.com/watch?v=QLuJYzcWbmM&t=2s (Explanation)
Working on IP Security
The host checks if the packet should be transmitted using IPsec or not. This packet traffic
triggers the security policy for itself. This is done when the system sending the packet
applies appropriate encryption. The incoming packets are also checked by the host that
they are encrypted properly or not.
Then IKE Phase 1 starts in which the 2 hosts( using IPsec ) authenticate themselves to
each other to start a secure channel. It has 2 modes. The Main mode provides greater
security and the Aggressive mode which enables the host to establish an IPsec circuit
more quickly.
The channel created in the last step is then used to securely negotiate the way the IP
circuit will encrypt data across the IP circuit.
Now, the IKE Phase 2 is conducted over the secure channel in which the two hosts
negotiate the type of cryptographic algorithms to use on the session and agree on secret
keying material to be used with those algorithms.
Then the data is exchanged across the newly created IPsec encrypted tunnel. These
packets are encrypted and decrypted by the hosts using IPsec SAs.
When the communication between the hosts is completed or the session times out then
the IPsec tunnel is terminated by discarding the keys by both hosts.
https://www.geeksforgeeks.org/ip-security-ipsec/
SIEM – SPLUNK & ALIEN VAULT
SIEM- Security Information & Event Management
Collection
Data parsing is converting data from one format to another. Widely used for data
structuring, it is generally done to make the existing, often unstructured, unreadable data more
comprehensible.
Aggregation
Storage
SPLUNK
What is Splunk?
Working of SPLUNK
In case of firewall and router we do not need a forwarder.
Deployment
Splunk Enterprise and Cloud are paid versions without any storage data limit. They can
be installed as standalone, distributed or Cluster components.
Splunk Light is for single user and has limitation.
Components Of Splunk
Processing Components
Indexer
Index is a repository that stores processed data. It contains data that are transformed into
events.
Index contains of 2 types of data i.e., Raw data in compressed form and Index data that
point to the raw data. Index files are also called tsidx files.
Files reside in directories organized by their age. These directories are also called
buckets.
Bucket stages:
Search Heads:
Search head takes search request from user and distributes it to the indexers. The indexer
searches through its indexes and gives the result to search head.
The search head applies knowledge object to the results and represents the data to the
user.
Knowledge objects used to extract additional fields and transform data without changing
underlined index data
Forwarder :
These collect the data and forward it to indexer or other forwarded depending in the instances.
These are of 2 types:
Difference between universal forwarder and heavy forwarder is universal forwarder forwards
unparsed Data. Heavy forwarder forwards Parsed Data to indexer.
Deployments Environments:
Standalone Deployment:
In this deployment all functions of splunk software are hosted in a single server.
Distributed Deployment:
In this deployment, functions of splunk software are hosted in different instances.
Important configuration files
In global context includes function like indexing and app/user includes searching
Binding Splunk to an IP address:
Temporary
Permanent
To make the settings permanent edit the web.conf file do as shown In below screenshots:
Then, finally restart the service .
Data Ingestion Phases:
Data ingestion is the process of obtaining and importing data for immediate use or storage in a
database. To ingest something is to take something in or absorb something. Data can be streamed
in real time or ingested in batches. In real-time data ingestion, each data item is imported as the
source emits it.
Data Pipeline:
The route that data takes through Splunk Enterprise, from its origin in sources such as log files
and network feeds, to its transformation into searchable events that encapsulate valuable
knowledge.
Each pipeline has its own functions called processors. The data que & data ingest flow will help
us understand the functioning.
Data Ques & Data Ingest Flow
Data queues are the memory space used to store data between the pipelines. The output of the
previous is saved here as a que before it gets picked by the next pipeline.
The Forwarder forwards the data to the indexer.
In the Indexer the pipelines pick up the data from the ques and do the following functions.
Parsing pipeline : character set detection, line breaking & Header parsing of data.
Merging Pipeline: grid parsing and line merging of data
Typing Pipeline: Regular expression replacement, adds Annotation to the data.
Index Pipeline: Indexing and storing of data.
Then, the data moves to the buckets
Correlation between Splunk Data Pipeline and splunk Components:
SPLUNK LICENSES:
Meta data values are source , source type & host. i.e the help in identifying source of the data,
the type of the data and details of the host.
If meta data is not available than it will use the default instead of the metadata as shown in the
above table.
Installing Splunk
Considering All the network setup is done for the system or vm we may proceed with the below
steps.
Latest as of 12/4/23
1) Give the below command to download the splunk package.
wget -O splunk-9.1.2-b6b9c8185839-linux-2.6-amd64.deb
https://download.splunk.com/products/splunk/releases/9.1.2/linux/splunk-9.1.2-b6b9c8185839-
linux-2.6-amd64.deb
4) Than we enable boot-start so whenever the system is started by default even splunk starts.
During this process we may have to provide the username and password to access Splunk.
You may check status of splunk if required by giving the command “systemctl status splunk”.
Incase if it is not active than you may start it manually by the below command.
By one of the below examples, You may access webui by giving the I.P as follows
1) V.M I.P:PORT Eg: 192.168.15.82:8000 or 192.168.15.82:8080
2) http://V.M I.P:PORT Eg: http://192.168.15.82:8000 or http://192.168.15.82:8080
3) https://V.M I.P:PORT Eg: https://192.168.15.82:8000 or https://192.168.15.82:8080
Interface
Tour of splunk
Account settings
Preferences setting: change the time zone
Creating a user:
View capabilities shows the users capabilities. Using this we can control what searches are
allowed to the user.
ONBOARDING LOGS
File uploading
Creating a new index
Uploading file:
Configuring inputs.conf file
Logs Importing
Logs onboarding from Linux
for onboarding the linux authentication log I am using a putty access from rdp to the ubuntu
linux , having the ip of 192.168.30.10 And login as ubuntu cdlin
Then going as root user and changing the directory to var/log to get the authentication logs
For getting the authentication logs use the command as tail -f auth.log this is used in ubuntu
based linux.
Ping to check for the connectivity to the spunk host i.e 192.168.30.10
we are creating a rdp connection from our purplesynapz rdp to window client1 rdp as shown in
the below screenshot and from rdp(192.168.15.172)host windows forwarder is copied and pasted
to the rdp 192.168.30.40
Leave it empty
For deployment of logs from splunk to splunk we use forwarding and receiving
cli
ck on configure receiving as mentioned in below screenshot
the
n click on new receiving port
I have given the listening port as 9997 it will receive data on tcp port 9997
Now the our splunk instance Is listening other splunks instances logs
the
n the we have given the splunk receiving indexer the hostname and the listening port no.
Then install
Creating a input.conf file in splunk universal forwarder for the logs to the our splunk instance
Then open that input.conf by the notepad and add a stanza because we collecting the windows
event logs
As we want the logs of the security channel we have given the security as I mentioned in the
screenshot below as I want to send this logs to the windows that’s why I have given the index as
windows
Eg 1: only security logs
[WinEventLog://Security]
index = windows2
INPUTS.CONF ( Example 1)
[monitor://C:\Windows\Performance\WinSAT\winsat.log]
disabled = 0
index = windows2
sourcetype = Windowslogs
source = C:\Windows\Performance\WinSAT\winsat.log
[WinEventLog://Application]
disabled = 0
index = windows2
sourcetype = Windowslogs
[WinEventLog://Security]
disabled = 0
index = windows2
sourcetype = Windowslogs
[WinEventLog://System]
disabled = 0
index = windows2
sourcetype = Windowslogs
[perfmon://CPU]
disabled = 0
index = windows2
counters = % Processor Time
instances = _Total;
object = Processor
interval = 300
[perfmon://LogicalDisk]
disabled = 0
index = windows2
counters = % Free Space; Free Megabytes; Used Space; Used Megabytes
instances = *
object = LogicalDisk
interval = 300
inputs.conf ( example 2)
[default]
index = windows_logs
[monitor://C:\Windows\Performance\WinSAT\winsat.log]
disabled = 0
[WinEventLog://Application]
disabled = 0
[WinEventLog://Security]
disabled = 0
[WinEventLog://System]
disabled = 0
[perfmon://CPU]
disabled = 0
counters = % Processor Time
instances = _Total
object = Processor
interval = 300
[perfmon://LogicalDisk]
disabled = 0
counters = % Free Space; Free Megabytes; Used Space; Used Megabytes
instances = *
object = LogicalDisk
Ex 3
[default]
index = windows_logs
[monitor://C:\Windows\Performance\WinSAT\winsat.log]
disabled = 0
[WinEventLog://Application]
disabled = 0
[WinEventLog://Security]
disabled = 0
[WinEventLog://System]
disabled = 0
[WinEventLog://Setup]
disabled = 0
[WinEventLog://ForwardedEvents]
disabled = 0
[WinEventLog://DNS Server]
disabled = 0
[WinEventLog://Directory Service]
disabled = 0
[WinEventLog://Windows PowerShell]
disabled = 0
[perfmon://CPU]
disabled = 0
counters = % Processor Time
instances = _Total
object = Processor
interval = 300
[perfmon://LogicalDisk]
disabled = 0
counters = % Free Space; Free Megabytes; Used Space; Used Megabytes
instances = *
object = LogicalDisk
[perfmon://Memory]
disabled = 0
counters = Available MBytes; Pages/sec; Committed Bytes
instances = _Total
object = Memory
interval = 300
[perfmon://Network]
disabled = 0
counters = Bytes Total/sec; Bytes Received/sec; Bytes Sent/sec
instances = *
object = Network Interface
interval = 300
[perfmon://System]
disabled = 0
counters = Processor Queue Length; System Calls/sec
instances = _Total
object = System
interval = 300
1. Setup Logs:
o [WinEventLog://Setup]: Logs related to system setup.
2. Forwarded Events:
o [WinEventLog://ForwardedEvents]: Logs forwarded from other systems.
[tcpout]
defaultGroup = default-autolb-group
[tcpout:default-autolb-group]
server = 192.168.30.10:9997
[tcpout-server://192.168.30.10:9997]
Now creating the index in our splunk instance
By writing the stanza as renderXml= true we are getting the logs in xml format
In order to update the configuration we have to restart the splunk forwarder either from cli or
services,
Note : whenever we are trying to change the configuration try to restart the services
Logs from Checkpoint
cp_log_export add name splunk_log target-server 192.168.30.10 target-port 5141 protocol tcp
format splunk read-mode semi-unified –apply-now
Splunk search Assistant:
Search Assistant
Search Modes
Search Components
Search Pipeline
Using Time Range Filter
Search Fields
Field
Field Discovery
Field sidebar
Selected Fields
Using Fields:
Field Extraction
Commands
STATS
Calculates statistics about events, such as counts, sums, averages, and more
Distinct count
Renaming fields using stats
https://www.youtube.com/watch?
v=5YXjmQpJEjw&list=PLFF93FRoUwXEGaNAmZTc9pek9WzUq6unp
TIMECHART
Visualizes event trends over time in a chart format.
https://www.youtube.com/watch?
v=Rx7d47ilkIw&list=PLFF93FRoUwXEGaNAmZTc9pek9WzUq6unp&index=2
DEDUP
Removes duplicate events based on specified fields
https://www.youtube.com/watch?
v=WouGxslDN2s&list=PLFF93FRoUwXEGaNAmZTc9pek9WzUq6unp&index=3
CHART
SAME AS STATS COMMAND
TOP/RARE
Top: displays the most frequent values for a given field
Rare: shows the least frequent values for a field
Top 10 shows by default with only top command
Search/Where
Where: further filters events based on additional conditions.
RENAME
Rename: renames existing fields
Double Quotes for “Source IP” is required when you want a name with space in it. If not
SourceIP or Source_IP can be given as name
https://www.youtube.com/watch?
v=PrT9l1s9Fv0&list=PLFF93FRoUwXEGaNAmZTc9pek9WzUq6unp&index=8
FIELDS
Fields: specifies which fields to include or exclude in the results.
TABLE
Table: presents results in a tabular format.
EVAL
Eval: creates new fields or modifies existing fields.
SYNTAX
EXAMPLE CONDITION:
Below is a case in which the syntax is applied and 1=1 acts like else function.
https://www.youtube.com/watch?
v=IcHApZh9eEg&list=PLFF93FRoUwXEGaNAmZTc9pek9WzUq6unp&index=10
HEAD
Head: returns only the first n events in the results.
TAIL
Tail: returns only the last n events in the results.
Before applying the tail command:
As we can observe the data is not showing the latest values sorted accurately.
Architecture
Commercial version (USM) includes all 3 usm sensor, server & logger
But free version(OSSIM) does not include logger.
OSSIM VS USM
Assets & Inventory:
Scroll down after scan is complete. Next click on update managed assets.
After clicking in save we can see our assets updated as follows.
Scroll down in the same page and we can see all these options to explore related to the asset like
softwares it has , alarms set for it, services etc.
Behavioral Monitoring
Security Intelligence
INTRODUCTION:
CLOUD COMPUTING.
cloud computing is the delivery of computing services—including servers, storage,
databases, networking, software, analytics, and intelligence—over the Internet (“the cloud”) to
offer faster innovation, flexible resources, and economies of scale. You typically pay only for
cloud services you use, helping lower your operating costs, run your infrastructure more
efficiently and scale as your business needs chang
Reason for cloud computing
Types of Cloud:
1. Deployment Model
I. Public cloud:
Using the public cloud can save businesses money in a couple of different ways:
Lower equipment purchase costs: Because employees can access and pay for cloud-based
resources only when they need them, using public cloud–based desktops and applications is often
less expensive than purchasing physical IT equipment or software packages that may or may not
be used and will need to be maintained.
Lower equipment maintenance costs: With public cloud-based services, the cost of
maintaining IT equipment is also passed on to the cloud service provider.
A small or new business may have an easier time migrating applications to the public cloud;
organizations with a large legacy IT infrastructure and applications have more to consider and
plan for. However, more and more enterprise businesses are moving toward public cloud as one
element of a multi-faceted IT plan. This way, they can access the benefits of public cloud while
also maintaining the different benefits that come with on-premises architecture and private cloud
options.
How Public Cloud works?
1) Low Cost
Public cloud has a lower cost than private, or hybrid cloud, as it shares the
same resources with a large number of consumers.
2) Location Independent
Public cloud is location independent because its services are offered through
the internet.
3) Save Time
In Public cloud, the cloud service provider is responsible for the manage and
maintain data centers in which data is stored, so the cloud user can save
their time to establish connectivity, deploying new products, release product
updates, configure, and assemble servers.
5) Business Agility
Public cloud provides an ability to elastically re-size computer resources
based on the organization's requirements.
6) Scalability and reliability
Public cloud offers scalable (easy to add and remove) and reliable (24*7
available) services to the users at an affordable cost.
Disadvantages of Public Cloud
1) Low Security
Public Cloud is less secure because resources are shared publicly.
2) Performance
In the public cloud, performance depends upon the speed of internet
connectivity.
3) Less customizable
Public cloud is less customizable than the private cloud.
3) Cost effective
It offers the features of both the public as well as the private cloud. A hybrid cloud is capable of
adapting to the demands that each company needs for space, memory, and system.
4) Security
Hybrid cloud is secure because critical activities are performed by the private cloud.
5) Risk Management
Hybrid cloud provides an excellent way for companies to manage the risk.
Disadvantages of Hybrid Cloud
1) Networking issues
In the Hybrid Cloud, networking becomes complex because of the private and the public cloud.
2) Infrastructure Compatibility
Infrastructure compatibility is the major issue in a hybrid cloud. With dual-levels of
infrastructure, a private cloud controls the company, and a public cloud does not, so there is a
possibility that they are running in separate stacks.
3) Reliability
The reliability of the services depends on cloud service providers.
A company that needs cloud computing services can choose to use a public cloud (where cloud
services are hosted by a cloud service provider and shared with other tenants), a private cloud
(where cloud services are hosted by the company itself), or a combination of the two, known as
a hybrid cloud.
Public cloud offers the advantage of easy scalability. Although a private cloud is less expensive
than using a public cloud (after an initial investment in the infrastructure), it doesn’t scale as
easily. Growing the infrastructure can require the purchase of additional equipment. If usage of
the private cloud shrinks, expensive resources and equipment become underutilized.
Hybrid cloud can be a great compromise for those considering public cloud vs private cloud.
Hybrid cloud refers to any combination of private and public cloud solutions. A hybrid cloud
environment allows organizations to benefit from the advantages of both types of cloud
platforms and choose which cloud to use based on specific data needs. For instance, hybrid cloud
provides an alternative for storing sensitive data—a company might provide services via a public
cloud while keeping sensitive information on a private cloud.
2. Service Model
PaaS cloud computing platform is created for the programmer to develop, test, run, and manage
the applications.
Characteristics of PaaS
There are the following characteristics of PaaS -
o Accessible to various users via the same development application.
o Integrates with web services and databases.
o Builds on virtualization technology, so resources can easily be scaled up or down as per
the organization's need.
o Support multiple languages and frameworks.
o Provides an ability to "Auto-scale".
Example: AWS Elastic Beanstalk, Windows Azure, Heroku, Force.com, Google App Engine,
Apache Stratos, Magento Commerce Cloud, and OpenShift.
Advantages of PaaS
There are the following advantages of PaaS -
1) Simplified Development
PaaS allows developers to focus on development and innovation without worrying about
infrastructure management.
2) Lower risk
No need for up-front investment in hardware and software. Developers only need a PC and an
internet connection to start building applications.
3) Prebuilt business functionality
Some PaaS vendors also provide already defined business functionality so that users can avoid
building everything from very scratch and hence can directly start the projects only.
4) Instant community
PaaS vendors frequently provide online communities where the developer can get the ideas to
share experiences and seek advice from others.
5) Scalability
Applications deployed can scale from one to thousands of users without any changes to the
applications.
SaaS is also known as "on-demand software". It is a software in which the applications are
hosted by a cloud service provider. Users can access these applications with the help of internet
connection and web browser.
Characteristics of SaaS
There are the following characteristics of SaaS -
o Managed from a central location
o Hosted on a remote server
o Accessible over the internet
o Users are not responsible for hardware and software updates. Updates are applied
automatically.
o The services are purchased on the pay-as-per-use basis
Example: BigCommerce, Google Apps, Salesforce, Dropbox, ZenDesk, Cisco WebEx,
ZenDesk, Slack, and GoToMeeting.
It provides a virtual data center to store It provides virtual platforms and It provides web software and
information and create platforms for tools to create, test, and deploy apps to complete business tasks.
app development, testing, and apps.
deployment.
It provides access to resources such as It provides runtime environments It provides software as a service
virtual machines, virtual storage, etc. and deployment tools for to the end-users.
applications.
https://www.geeksforgeeks.org/difference-between-iaas-paas-and-saas/
Virtualization:
Types
What is Cloud
Cloud Vs Virtualization
Amazon Web Services (AWS)
Types of EC2:
Amazon EC2 provides a wide selection of instance types optimized to fit different use
cases. Instance types comprise varying combinations of CPU, memory, storage, and networking
capacity and give you the flexibility to choose the appropriate mix of resources for your
applications. Each instance type includes one or more instance sizes, allowing you to scale your
resources to the requirements of your target workload.
General Purpose:
General purpose instances provide a balance of compute, memory and networking resources, and
can be used for a variety of diverse workloads.
These instances are ideal for applications that use these resources in equal proportions such as
web servers and code repositories.
EG: MAC , T4g, T3, T3a, M6g, M6a etc. ( Link provided in important links for in depth
references)
Compute Optimized:
Compute Optimized instances are ideal for compute bound applications that benefit from high
performance processors.
Instances belonging to this family are well suited for batch processing workloads, media
transcoding, high performance web servers, high performance computing (HPC), scientific
modeling, dedicated gaming servers and ad server engines, machine learning inference and other
compute intensive applications.
EG : C7g, C6g, C6gn, C6i, C5, C4 etc.
Memory Optimized:
Memory optimized instances are designed to deliver fast performance for workloads that process
large data sets in memory.
Storage optimized instances are designed for workloads that require high, sequential read and
write access to very large data sets on local storage. They are optimized to deliver tens of
thousands of low-latency, random I/O operations per second (IOPS) to applications.
When you launch an instance in Amazon EC2 for first time, you have the option of
passing user data to the instance that can be used to perform common automated
configuration tasks and even run scripts after the instance starts.
You can pass two types of user data to Amazon EC2: shell scripts and cloud-init
directives.
You can also pass this data into the launch instance wizard as plain text, as a file (this is
useful for launching instances using the command line tools), or as base64-encoded text
(for API calls).
Important links:
https://www.youtube.com/watch?v=k1fEBxAoHdk&t=276s
Security Groups :
IAM (Identity Access Management)
Short notes image:
Shared Responsibility Model:
Security and Compliance is a shared responsibility between AWS and the customer.
This shared model can help relieve the customer’s operational burden as AWS operates,
manages and controls the components from the host operating system and virtualization
layer down to the physical security of the facilities in which the service operates. The
customer assumes responsibility and management of the guest operating system
(including updates and security patches), other associated application software as well as
the configuration of the AWS provided security group firewall.
AWS responsibility “Security of the Cloud”.
Customer responsibility “Security in the Cloud”.
https://aws.amazon.com/compliance/shared-responsibility-model/
VPC ( Virtual Private Cloud):
https://www.youtube.com/watch?v=tVuZSBrLM0A&t=181s
ELB (Elastic Load Balancer) :
Load balancing can be done based on algorithms also , refer link
https://kemptechnologies.com/load-balancer/load-balancing-algorithms-techniques
Important Links:
https://aws.amazon.com/blogs/networking-and-content-delivery/application-load-balancer-type-
target-group-for-network-load-balancer/#:~:text=Application%20Load%20Balancer%20(ALB)
%20is,such%20as%20Amazon%20EC2%20instances.
https://aws.amazon.com/elasticloadbalancing/gateway-load-balancer/
https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html
https://www.youtube.com/watch?v=VFwLffElIgc
OWASP top 10
◦ SQL injection (About attack & mitigations)
◦ Cross-site scripting (About attack & mitigations)
◦ TCP 3-way handshake
◦ OSI model (layers, protocols, examples, ports)
◦ What are Ransomwares
◦ How will you protect a computer/end point
◦ How does a malware spread
◦ Mitre Attack
◦ Tell us about some cyber-attacks happened
◦ What are IDS and IPS and How do you differentiate between IDS and IPS
system?
◦ What is understanding of SIEM
◦ Log onboarding process
◦ Splunk Architecture
◦ Man in the middle attack
◦ Bruteforce attack
◦ SSL handshake
◦ TCP flags
◦ How does a firewall work? What is the better approach of setting up a firewall?
◦ What is the difference between Satateful and stateless firewall?
Cyber Security
MITRE ATT&CK Framework
The MITRE ATT&CK framework is a knowledge base of tactics and techniques designed for
threat hunters, defenders and red teams to help classify attacks, identify attack attribution and
objectives, and assess an organization's risk. Organizations can use the framework to identify
security gaps and prioritize mitigations based on risk.
Q) What Are Tactics in the MITRE ATT&CK Framework?
Ans) Tactics represent the “why” of an ATT&CK technique or sub-technique. Adversarial
tactics represent the attacker's goal or the reason for performing an action. For example, an
adversary may want to achieve credential access.
There are 14 tactics in the Enterprise ATT&CK Matrix:
12. Command and Control Communicate with compromised systems to control them
Source:
https://www.trellix.com/en-us/security-awareness/cybersecurity/what-is-mitre-attack-
framework.html#:~:text=The%20MITRE%20ATT%26CK%20framework%20is,they%20are
%20known%20to%20target.
LOAD BALANCER
https://www.enjoyalgorithms.com/blog/types-of-load-balancing-algorithms
NIST