Which OSI layer is responsible for ordered delivery of packets?
The transport layer is also responsible for the management of error correction, providing quality and reliability to the end user. This layer enables the host to send and receive error corrected data, packets or messages over a network and is the network component that allows multiplexing. It ensures that packets are always delivered in strict sequence. Although the network layer is responsible, the transport layer can fix any discrepancies in sequence caused by packet drops or device interruption.
What is Malware?
Malicious software or malware is any program that seeks to do harm or steal information. There are many defenses in place to protect you from malware, such as antivirus and antispyware software, firewalls and spam filters, but these tools cannot protect you if you unwittingly cooperate with malware.
Examples of different kinds of malware that could infect your computer include:
- Viruses and worms
- Bots and Zombies
- Spyware and Adware
- Ransomware and Fake Antivirus software and
- Trojan Horses
Attack Vectors:
- Email Attachments
- Email messages
- Downloaded Programs
- Instant Messages
- SPAM Email
- Social networks
- Mobile Data devices
What is the standard IANA port number used for requesting web pages?
On a Web server or Hypertext Transfer Protocol daemon, port 80 is the port that the server "listens to" or expects to receive from a Web client, assuming that the default was taken when the server was configured or set up.
What type of offence does slandering is categorized as?
Slandering is categorized as cyberstalking. Cyberstalking is a crime in which the attacker harasses a victim using electronic communication, such as e-mail or instant messaging (IM), or messages posted to a Web site or a discussion group. A cyberstalker relies upon the anonymity afforded by the Internet to allow them to stalk their victim without being detected. Cyber stalking can be terribly frightening. It can destroy friendships, credit, careers, self-image, and confidence. Ultimately it can lead the victim into far greater physical danger when combined with real-world stalking. Yes, we're talking serious stuff here. Victims of domestic violence are often cyber stalking victims. They, like everybody else, need to be aware that technology can make cyber stalking easy. Spyware software can be used to monitor everything happening on your computer or cell phone, giving tremendous power and information to Cyber stalkers.
Most Common Forms of Cyber Security Threats
1. Phishing - It is the practice of sending false emails that appear to be from legitimate sources. The goal is to steal sensitive information such as credit card numbers and login details. It is the most prevalent form of cyber security attack. You can protect yourself by making yourself aware of the same or using a technological solution that filters out dangerous emails.
2. Ransomware - The term "ransomware" refers to a type of harmful software with the purpose to extort money from users. This cyber security attack prevents access to data or the computer system until a ransom is paid. Even if the ransom is paid, it does not ensure file retrieval or that your system will be restored.
3. Malware - This is a form of software that is meant to gain unauthorized access to a computer or to cause harm to it. This cyber security threat is mainly delivered through emails or as an authentic download.
4. Social Engineering - Adversaries employ this type of attack to deceive you into disclosing sensitive information. They might demand money or obtain access to your private information. This cyber security threat can be used in conjunction with any of the dangers outlined above to increase your likelihood of clicking on links, downloading malware, or trusting a malicious source.
What is network security, and what are its types?
Network security is essentially a set of rules and configurations formulated to protect the accessibility, confidentiality, and integrity of computer networks and data with the help of software and hardware technologies. Types of network security:
- Network access control: To prevent attackers and infiltrations in the network, network access control policies are in place for both users and devices at the most granular level. For example, access authority to network and confidential files can be assigned and regulated as needed.
- Antivirus and antimalware software: Antivirus and antimalware software are used to continuously scan and protect against malicious software, viruses, worms, ransomware, and trojans.
- Firewall protection: Firewalls act as a barrier between your trusted internal network and an untrusted external network. Administrators can configure a set of defined rules for the permission of traffic into the network.
- Virtual private networks (VPNs): VPNs form a connection to the network from another endpoint or site. For example, an employee working from home uses a VPN to connect to the organization’s network. The user would need to authenticate to allow this communication. The data between the two points is encrypted.
Distinguish between phishing and spoofing?
Phishing and spoofing are totally different beneath the surface. One downloads malware to your PC or network, and the other part tricks you into surrendering sensitive monetary data to a cyber-crook. Phishing is a technique for recovery, while spoofing is a method for delivery.
What is network sniffing?
System sniffing includes utilizing sniffer tools that empower real- time monitoring and analysis of data streaming over PC systems. Sniffers can be utilized for various purposes, regardless of whether it’s to steal data or manage systems. Network sniffing is utilized for ethical and unethical purposes. System administrators utilize these as system monitoring and analysis tool to analyse and avoid network related issues, for example, traffic bottlenecks. Cyber criminals utilize these devices for untrustworthy purposes, for example, character usurpation, email, delicate information hijacking etc.
What is Network Enumeration?
Network Enumeration is the revelation of hosts/gadgets on a network, they tend to utilize obvious disclosure protocols, for example, ICMP and SNMP to gather data, they may likewise check different ports on remote hosts for looking for surely known services trying to further recognize the function of a remote host.
ARP poisoning is a type of network attack that can be resolved through these techniques:
Using Packet filtering: Packet filters can filter out & block packets with clashing source address data.
Keeping away from trust relationship: Organizations ought to develop a protocol that depends on trust relationship as little as they can.
Utilize ARP spoofing software: Some programs assess and certify information before it is transmitted and blocks any information that is spoofed.
What does Authentication Service facilitates?
Authentication Service facilitates username/password validation using your on-premises Active Directory/LDAP server. Authentication Service is installed as a virtual appliance and communicates with your local directory using LDAP over SSL. It can operate in the DMZ or inside the local area network (LAN), or both, based on the mode(s) of operation. An authentication server is an application that facilitates authentication of an entity that attempts to access a network. Such an entity may be a human user or another server. An authentication server can reside in a dedicated computer, an Ethernet switch, an access point or a network access server. Hence, authentication Service facilitates username and password check.
What does SSO refers to?
SSO expands to Single Sign On. Single sign-on (SSO) is a property of access control of multiple related, but independent software systems. With this property a user logs in with a single ID and password to gain access to a connected system or systems without using different usernames or passwords, or in some configurations seamlessly sign on at each system. This is typically accomplished using the Lightweight Directory Access Protocol (LDAP) and stored LDAP databases on servers. A simple version of single sign-on can be achieved over IP networks using cookies but only if the sites share a common DNS parent domain
What is SSO (Single Sign-On)?
A friend recently went through the irksome experience of being signed out from a number of websites they use daily. This event will be familiar to millions of web users, and it is a tedious process to fix. It can involve trying to remember multiple long-forgotten passwords, or typing in the names of pets from childhood to answer security questions. SSO removes this inconvenience and makes life online better. But how does it work?
Basically, Single Sign-On (SSO) is an authentication scheme. It allows a user to log in to different systems using a single ID.
The diagram below illustrates how SSO works.
- Step 1: A user visits Gmail, or any email service. Gmail finds the user is not logged in and so redirects them to the SSO authentication server, which also finds the user is not logged in. As a result, the user is redirected to the SSO login page, where they enter their login credentials.
- Steps 2-3: The SSO authentication server validates the credentials, creates the global session for the user, and creates a token.
- Steps 4-7: Gmail validates the token in the SSO authentication server. The authentication server registers the Gmail system, and returns “valid.” Gmail returns the protected resource to the user.
- Step 8: From Gmail, the user navigates to another Google-owned website, for example, YouTube.
- Steps 9-10: YouTube finds the user is not logged in, and then requests authentication. The SSO authentication server finds the user is already logged in and returns the token.
- Step 11-14: YouTube validates the token in the SSO authentication server. The authentication server registers the YouTube system, and returns “valid.” YouTube returns the protected resource to the user.
What is Nmap?
Nmap, short for Network Mapper, is a network discovery and security auditing tool. It is known for its simple and easy to remember flags that provide powerful scanning options. Nmap is widely used by network administrators to scan for:
- Open ports and services
- Discover services along with their versions
- Guess the operating system running on a target machine
- Get accurate packet routes till the target machine
- Monitoring hosts
Nmap Scan Types
A variety of scans can be performed using Nmap. Below are the types of scans:
A TCP scan is generally used to check and complete a three-way handshake between you and a chosen target system. A TCP scan is generally very noisy and can be detected with almost little to no effort. This is “noisy” because the services can log the sender IP address and might trigger Intrusion Detection Systems.
2) UDP SCAN
UDP scans are used to check whether there is any UDP port up and listening for incoming requests on the target machine. Unlike TCP, UDP has no mechanism to respond with a positive acknowledgment, so there is always a chance for a false positive in the scan results. However, UDP scans are used to reveal Trojan horses that might be running on UDP ports or even reveal hidden RPC services. This type of scan tends to be quite slow because machines, in general, tend to slow down their responses to this kind of traffic as a precautionary measure.
This is another form of TCP scan. The difference is unlike a normal TCP scan, nmap itself crafts a syn packet, which is the first packet that is sent to establish a TCP connection. What is important to note here is that the connection is never formed, rather the responses to these specially crafted packets are analyzed by Nmap to produce scan results.
4) ACK SCAN
ACK scans are used to determine whether a particular port is filtered or not. This proves to be extremely helpful when trying to probe for firewalls and their existing set of rules. Simple packet filtering will allow established connections (packets with the ACK bit set), whereas a more sophisticated stateful firewall might not.
5) FIN SCAN
Also a stealthy scan, like the SYN scan, but sends a TCP FIN packet instead. Most but not all computers will send an RST packet (reset packet) back if they get this input, so the FIN scan can show false positives and negatives, but it may get under the radar of some IDS programs and other countermeasures.
6) NULL SCAN
Null scans are extremely stealthy scan and what they do is as the name suggests — they set all the header fields to null. Generally, this is not a valid packet and a few targets will not know how to deal with such a packet. Such targets are generally some version of windows and scanning them with NULL packets may end up producing unreliable results. On the other hand, when a system is not running windows this can be used as an effective way to get through.
7)XMAS SCAN
Just like null scans, these are also stealthy in nature. Computers running windows will not respond to Xmas scans due to the way their TCP stack is implemented. The scan derives its name from the set of flags that are turned on within the packet that is sent out for scanning. XMAS scans are used to manipulate the PSH, URG and FIN flags that can be found in the TCP header.
RPC scans are used to discover machines that respond to Remote Procedure Call services (RPC). RPC allows commands to be run on a certain machine remotely, under a certain set of connections. RPC service can run on an array of different ports, hence, it becomes hard to infer from a normal scan whether RPC services are running or not. It is generally a good idea to run an RPC scan from time to time to find out where you have these services running.
IDLE scan is the stealthiest of all scans discussed in this nmap tutorial, as the packets are bounced off an external host. Control over the host is generally not necessary, but the host needs to meet a specific set of conditions. It is one of the more controversial options in Nmap since it only has a us
Nmap Commands
In this section of Nmap Tutorial, I’ll be listing down the various commands you can use in Nmap along with their flag and usage description with an example on how to use it.
Scanning Techniques
Flag | Use | Example |
-sS | TCP syn port scan | nmap -sS 192.168.1.1 |
-sT | TCP connect port scan | nmap -sT 192.168.1.1 |
–sU | UDP port scan | nmap –sU 192.168.1.1 |
–sA | TCP ack port scan | nmap –sA 192.168.1.1 |
Flag | Use | Example |
-Pn | only port scan | nmap -Pn192.168.1.1 |
-sn | only host discover | nmap -sn192.168.1.1 |
-PR | arp discovery on a local network | nmap -PR192.168.1.1 |
-n | disable DNS resolution | nmap -n 192.168.1.1 |
Port Specification
Flag | Use | Example |
-p | specify a port or port range | nmap -p 1-30 192.168.1.1 |
-p- | scan all ports | nmap -p- 192.168.1.1 |
-F | fast port scan | nmap -F 192.168.1.1 |
Service Version and OS Detection
Flag | Use | Example |
-sV | detect the version of services running | nmap -sV 192.168.1.1 |
-A | aggressive scan | nmap -A 192.168.1.1 |
-O | detect operating system of the target | nmap -O 192.168.1.1 |
Timing and Performance
Flag | Use | Example |
-T0 | paranoid IDS evasion | nmap -T0 192.168.1.1 |
-T1 | sneaky IDS evasion | nmap -T1 192.168.1.1 |
-T2 | polite IDS evasion | nmap -T2 192.168.1.1 |
-T3 | normal IDS evasion | nmap -T3 192.168.1.1 |
-T4 | aggressive speed scan | nmap -T4 192.168.1.1 |
-T5 | insane speed scan | nmap -T5 192.168.1.1 |
NSE Scripts
Flag | Use | Example |
-sC | default script scan | nmap -sC 192.168.1.1 |
–script banner | banner grabbing | nmap –script banner 192.168.1.1 |
IDS Evasion
Flag | Use | Example |
-f | use fragmented IP packets | nmap -f 192.168.1.1 |
-D | decoy scans | nmap -D 192.168.1.1 |
-g | use a given source port number | nmap -g 22 192.168.1.1 |
Let’s discuss some of the most common cryptographic algorithms used till date:
- SHA-0: produces 120-bit hash values. It was withdrawn from use due to significant flaws and replaced by SHA-1.
- SHA-1: produces 160-bit hash values. It is similar to earlier versions of MD5. It has cryptographic weakness and is not recommended for use since the year 2010.
- SHA-2: it has two hash functions namely SHA-256 and SHA-512. SHA-256 uses 32-bit words while SHA-512 uses 64-bit words.
- SHA-3: this algorithm was formally known as Keccak.
Ransomware is a type of malware that prevents or limits users from accessing their system. This type of malware forces its victims to pay the ransom through certain online payment methods in order to grant access to their systems, or to get their data back. Some ransomware encrypts files (called Cryptolocker).
What type of virus is an macro virus?
Interpreted virus is an macro virus. An interpreted virus is composed of source code that can be executed only by a particular application or service. Interpreted viruses have become very common because they are much easier to write and modify than other types of viruses. A macro virus is a virus that is written in a macro language: a programming language which is embedded inside a software application (e.g., word processors and spreadsheet applications).
- Username/password: modify the default password for a firewall device
- Remote administration: Disable the feature of the remote administration
- Port forwarding: Configure appropriate port forwarding for certain applications to work properly, such as a web server or FTP server
- DHCP server: Installing a firewall on a network with an existing DHCP server will cause conflict unless the firewall’s DHCP is disabled
- Logging: To troubleshoot firewall issues or potential attacks, ensure that logging is enabled and understand how to view logs
- Policies: You should have solid security policies in place and make sure that the firewall is configured to enforce those policies.
- A browser tries to connect to the webserver secured with SSL
- The browser sends a copy of its SSL certificate to the browser
- The browser checks if the SSL certificate is trustworthy or not. If it is trustworthy, then the browser sends a message to the web server requesting to establish an encrypted connection
- The web server sends an acknowledgment to start an SSL encrypted connection
- SSL encrypted communication takes place between the browser and the web server
- Malware
- Phishing
- Password Attacks
- DDoS
- Man in the Middle
- Drive-By Downloads
- Malvertising
- Rogue Software
- Password Length: You can set a minimum length for password. The lengthier the password, the harder it is to find.
- Password Complexity: Including different formats of characters in the password makes brute force attacks harder. Using alpha-numeric passwords along with special characters, and upper and lower case characters increase the password complexity making it difficult to be cracked.
- Limiting Login Attempts: Set a limit on login failures. For example, you can set the limit on login failures as 3. So, when there are 3 consecutive login failures, restrict the user from logging in for some time, or send an Email or OTP to use to log in the next time. Because brute force is an automated process, limiting login attempts will break the brute force process.
- Ping Scan
- TCP Half-Open
- TCP Connect
- UDP
- Stealth Scanning
- Threat: Someone with the potential to harm a system or an organization
- Vulnerability: Weakness in a system that can be exploited by a potential hacker
- Risk: Potential for loss or damage when threat exploits a vulnerability
- Ensure strong and unique password
- Avoid sharing confidential information online, especially on social media
- Shop from known and trusted websites
- Use the latest version of the browsers
- Install advanced malware and spyware tools
- Use specialized security solutions against financial data
- Always update your system and the software
- Protect your SSN (Social Security Number)
- Black hat hackers are known for having vast knowledge about breaking into computer networks. They can write malware which can be used to gain access to these systems. This type of hackers misuse their skills to steal information or use the hacked system for malicious purpose.
- White hat hackers use their powers for good deeds and so they are also called Ethical Hackers. These are mostly hired by companies as a security specialist that attempts to find and fix vulnerabilities and security holes in the systems. They use their skills to help make the security better.
- Grey hat hackers are an amalgamation of a white hat and black hat hacker. They look for system vulnerabilities without the owner’s permission. If they find any vulnerabilities, they report it to the owner. Unlike Black hat hackers, they do not exploit the vulnerabilities found.
- Use VPN
- Use strong WEP/WPA encryption
- Use Intrusion Detection Systems
- Force HTTPS
- Public Key Pair Based Authentication
- Flooding attacks: In this type, the hacker sends a huge amount of traffic to the server which the server can not handle. And hence, the server stops functioning. This type of attack is usually executed by using automated programs that continuously send packets to the server.
- Crash attacks: In this type, the hackers exploit a bug on the server resulting in the system to crash and hence the server is not able to provide service to the clients.
- Use Anti-DDOS services
- Configure Firewalls and Routers
- Use Front-End Hardware
- Use Load Balancing
- Handle Spikes in Traffic
- Validate user inputs
- Sanitize user inputs
- Encode special characters
- Use Anti-XSS services/tools
- Use XSS HTML Filter
What protocols fall under TCP/IP internet layer?
TCP/IP | TCP/IP Protocol Examples |
Application | NFS, NIS+, DNS, telnet, ftp, rlogin, rsh, rcp, RIP, RDISC, SNMP and others |
Transport | TCP, UDP |
Internet | IP, ARP, ICMP |
Data Link | PPP, IEEE 802.2 |
Physical Network | Ethernet (IEEE 802.3) Token ring, RS-232, others |
What is data protection in transit vs data protection at rest?
Data Protection in transit | Data protection at rest |
When data is going from server to client | When data just exists in its database or on its hard drive |
Effective Data protection measures for in-transit data are critical as data is less secure when in motion | Data at rest is sometimes considered to be less vulnerable than data in transit |
What is the difference between VPN and VLAN?
VPN | VLAN |
Helps to group workstations that are not within the same locations into the same broadcast domain | Related to remote access to the network of a company |
Means to logically segregate networks without physically segregating them with various switches | Used to connect two points in a secured and encrypted tunnel |
Saves the data from prying eyes while in transit and no one on the net can capture the packets and read the data | Does not involve any encryption technique but it is only used to slice up your logical network into different sections for the purpose of management and security |
- Don’t enter sensitive information in the webpages that you don’t trust
- Verify the site’s security
- Use Firewalls
- Use AntiVirus Software that has Internet Security
- Use Anti-Phishing Toolbar
- Use prepared statements
- Use Stored Procedures
- Validate user input
- Possible attacks
- Any abnormal activity
- Auditing the system data
- Analysis of different collected data, etc.
- Authentication
- Authorization
- Confidentiality
- Availability
- Integrity
- Non-repudiation
- Resilience
- Design flaws: If there are loopholes in the system that can allow hackers to attack the system easily.
- Passwords: If passwords are known to hackers they can get the information very easily. Password policy should be followed rigorously to minimize the risk of password steal.
- Complexity: Complex software can open doors on vulnerabilities.
- Human Error: Human error is a significant source of security vulnerabilities.
- Management: Poor management of the data can lead to the vulnerabilities in the system.
- White Box- All the information are provided to the testers.
- Black Box- No information is provided to the testers and they can test the system in a real-world scenario.
- Grey Box- Partial information is with the testers and rest they have to test on their own.
- Vulnerability Scanning: Automated software scans a system against known vulnerabilities.
- Security Scanning: Manual or automated technique to identify network and system weaknesses.
- Penetration testing: Penetration testing is on the security testing which helps in identifying vulnerabilities in a system.
- Risk Assessment: It involves the analysis of possible risks in the system. Risks are classified as Low, Medium and High.
- Security Auditing: Complete inspection of systems and applications to detect vulnerabilities.
- Ethical hacking: Hacking is done on a system to detect flaws in it rather than personal benefits.
- Posture Assessment: This combines Security Scanning, Ethical Hacking and Risk Assessments to show an overall security posture of an organization.
- Server and client random
- Server write MACsecret
- Client write MACsecret
- Server write key
- Client write key
- Initialization vectors
- Sequence numbers
- NIDS or Network Intrusion Detection
- NNIDS or Network Node Intrusion Detection System
- HIDS or Host Intrusion Detection System
- Cardholder
- Merchant
- Issuer
- Acquirer
- Payment gateway
- Certification authority
- SSL Recorded protocol
- Handshake protocol
- Change Cipher Spec
- Encryption algorithms
- Strobe: Scanning of known services.
- UDP: Scanning of open UDP ports
- Vanilla: In this scanning, the scanner attempts to connect to all 65,535 ports.
- Sweep: The scanner connects to the same port on more than one machine.
- Fragmented packets: The scanner sends packet fragments that get through simple packet filters in a firewall
- Stealth scan: The scanner blocks the scanned computer from recording the port scan activities.
- FTP bounce: The scanner goes through an FTP server in order to disguise the source of the scan.
- Session Cookies – These cookies are temporary and last in that session only.
- Persistent cookies – These cookies stored on the hard disk drive and last till its expiry or manual removal of it.
- Session identifier
- Peer certificate
- Compression method
- Cipher spec
- Master secret
- Is resumable
- Firewalls – Firewall is the protection layer that monitors the connections that can take place within a network.
- VPN’s – VPN Gateways are used to establish a secure connection to the remote systems.
- Anti Virus – It is used to monitor, identify and filter out all forms of malware.
- URL Filtering –URL filtering will keep the end-users protected by restricting them to access malicious sites.
- IDS system – Intrusion detection system monitors for malicious attacks and raises alerts to the admin team.
- Retention of Customers – If a Website is secured, users will definitely opt using it over the other websites. In the case of eCommerce websites, retention of customers results in the generation of more revenue online.
- Cost Saving – A Website compliant with all the security protocol drives less legal charges later, and also the cost involved in getting the site back up after a security attack gets reduced.
- Check if the web application is able to identify spam attacks on contact forms used on the website.
- Proxy server – Check if network traffic is monitored by proxy appliances. The proxy server makes it difficult for hackers to get internal details of the network thus protecting the system from external attacks.
- Spam email filters – Verify if incoming and outgoing email traffic is filtered and unsolicited emails are blocked.
- Many email clients come with inbuilt spam filters that need to be configured as per your needs. These configuration rules can be applied to email headers, subject or body.
- Firewall – Make sure the entire network or computers are protected with firewalls. A Firewall can be software or hardware to block unauthorized access to a system. A Firewall can prevent sending data outside the network without your permission.
- Try to exploit all servers, desktop systems, printers, and network devices.
- Verify that all usernames and passwords are encrypted and transferred over secure connections like https.
- Verify information stored in website cookies. It should not be in a readable format.
- Verify previously found vulnerabilities to check if the fix is working.
- Verify if there is no open port in the network.
- Verify all telephone devices.
- Verify WIFI network security.
- Verify all HTTP methods. PUT and Delete methods should not be enabled on a web server.
- Verify if the password meets the required standards. The password should be at least 8 characters long containing at least one number and one special character.
- Username should not be like “admin” or “administrator”.
- The application login page should be locked upon a few unsuccessful login attempts.
- Error messages should be generic and should not mention specific error details like “Invalid username” or “Invalid password”.
- Verify if special characters, HTML tags, and scripts are handled properly as an input value.
- Internal system details should not be revealed in any of the error or alert messages.
- Custom error messages should be displayed to end-users in case of a web page crash.
- Verify the use of registry entries. Sensitive information should not be kept in the registry.
- All files must be scanned before uploading them to the server.
- Sensitive data should not be passed in URLs while communicating with different internal modules of the web application.
- There should not be any hardcoded username or password in the system.
- Verify all input fields with long input string with and without spaces.
- Verify if reset password functionality is secure.
- Verify application for SQL Injection.
- Verify application for Cross-Site Scripting.
- Important input validations should be done at the server-side instead of JavaScript checks at the client-side.
- Critical resources in the system should be available to authorized persons and services only.
- All access logs should be maintained with proper access permissions.
- Verify user session ends upon log off.
- Verify that directory browsing is disabled on the server.
- Verify that all applications and database versions are up to date.
- Verify URL manipulation to check if a web application is not showing any unwanted information.
- Verify memory leak and buffer overflow.
- Verify if incoming network traffic is scanned to find Trojan attacks.
- Verify if the system is safe from Brute Force Attacks – a trial and error method to find sensitive information like passwords.
- Verify if the system or network is secured from DoS (denial-of-service) attacks. Hacker can target network or a single computer with continuous requests due to which resources on the target system gets overloaded resulting in the denial of service for legit requests.
- Verify application for HTML script injection attacks.
- Verify against COM & ActiveX attacks.
- Verify against spoofing attacks. Spoofing can be of multiple types – IP address spoofing, Email ID spoofing,
- ARP spoofing, Referrer spoofing, Caller ID spoofing, Poisoning of file-sharing networks, GPS spoofing.
- Check for an uncontrolled format string attack – a security attack that can cause the application to crash or execute the harmful script on it.
- Verify XML injection attack – used to alter the intended logic of the application.
- Verify against canonicalization attacks.
- Verify if the error pages are displaying any information that can be helpful for a hacker to enter into the system.
- Verify if any critical data like the password is stored in secret files on the system.
- Verify if the application is returning more data than it is required.
- Black Box Penetration Testing: In this approach, the tester assesses the target system, network or process without the knowledge of its details. They just have a very high level of inputs like URL or company name using which they penetrate the target environment. No code is being examined in this method.
- White Box Penetration Testing: In this approach, the tester is equipped with complete details about the target environment – Systems, network, OS, IP address, source code, schema, etc. It examines the code and finds out design & development errors. It is a simulation of an internal security attack.
- Grey Box Penetration Testing: In this approach, the tester has limited details about the target environment. It is a simulation of external security attacks.
Difference Between Functional and Non-Functional Testing
Functional Testing | Non Functional Testing |
---|---|
It tests ‘What’ the product does. It checks the operations and actions of an Application. | It checks the behaviour of an Application. |
Functional testing is done based on the business requirement. | Non- functional testing is done based on the customer expectation and Performance requirement. |
It tests whether the actual result is working according to the expected result. | It checks the response time, and speed of the software under specific conditions. |
It is carried out manually. Example: Black box testing method. | It is more feasible to test using automated tools. Example: Loadrunner. |
It tests as per the customer requirements. | It tests as per customer expectations. |
Customer feedback helps in reducing the risk factors of the product. | Customer feedback is more valuable for non- functional testing as it helps to improve and lets the tester to know the expectation of the customer. |
It is testing the functionality of the software. | It is testing the performance of the functionality of the software. |
Functional testing has the following types: •Unit testing •Integration testing •System Testing •Acceptance Testing | Non functional testing includes: •Performance testing •Load Testing •Stress testing •Volume testing •Security testing •Installation testing •Recovery testing |
Example: A Login page must show textboxes to Enter the username and password. |
- Understanding the functionality offered by the web service. Basically, a web service’s functionality is described by WSDL (web services description language) file.
- Determine the XML request and response format.
- Sending request and then validating the response against request sent.
- We have both manual and automation testing tools available to test web services.
- ARP Spoofing Attack.
- DNS Spoofing Attack.
- IP Spoofing Attack.
- Buffer overflow attacks
- ICMP flood
- SYN flood
- Teardrop attack
- Smurf attack
- Error-based SQL injection
- Blind SQL injection
- Time-based SQL injection
- Proxy
- Spider
- Scanner
- Intruder
- Repeater
- Decoder
- Comparer
- Sequencer
- Using Firewall : Firewall may be accustomed drop traffic from suspicious information processing address if attack may be an easy DOS
- Encrypting the Cookies : Cookie or Session poisoning may be prevented by encrypting the content of the cookies, associating cookies with the consumer information processing address and temporal arrangement out the cookies once it slow
- Validating and confirmative user input : This approach is prepared to stop the type tempering by confirmative and verifying the user input before processing it
- Header Sanitizing and validation : This technique is beneficial against cross website scripting or XSS, this method includes verifying and sanitizing headers, parameters passed via the address, type parameters and hidden values to cut back XSS attacks.
- Netsparker
- Wireshark
- Metasploit
- BeEF
- Aircrack
- Active sniffing: Sniffing in a point-to-point network device called the switch is referred to as active sniffing. The switch is responsible for the regulation of the data flow between its ports. This is done through the active monitoring of the MAC address on each port, which enables the passing of data only to the intended target. To activate the sniffing of the traffic between targets, sniffers have to inject traffic into the LAN.
- Passive sniffing: Passive sniffing happens when the sniffing is done through the hub. The traffic that goes through the unbridged network or the non-switched segment is transparent to all machines in that segment. Here, sniffers work at the network’s data link layer. This is called passive sniffing as sniffers set up by the attackers passively wait for the data to capture them when they are sent.
- NMAP – NMAP stands for Network plotter. It’s associate degree open source tool that’s used wide for network discovery and security auditing.
- Metasploit – Metasploit is one amongst the most powerful exploit tool to conduct basic penetration tests.
- Burp Suit – Burp Suite could be a widespread platform that’s widely used for playing security testing of internet applications.
- Angry IP Scanner – Angry information processing scanner could be a light-weight, cross-platform information processing address and port scanner.
- Cain & Abel – Cain & Abel is a password recovery tool for Microsoft operational Systems.
- Ettercap – Ettercap stands for local area network Capture. It is used for Man-in-the-Middle attack using a network security tool.
- Surveillance : This is the principal stage where the hacker endeavours to gather as much data as possible about the target
- Scanning : This stage includes exploiting the data accumulated amid Surveillance stage and utilizing it to inspect the casualty. The hacker can utilize computerized devices amid the scanning stage which can incorporate port scanners, mappers and vulnerability scanners.
- Getting access : This is where the real hacking happens. The hacker attempts to exploit data found amid the surveillance and Scanning stage to get access.
- Access Maintenance : Once access is gained, hackers need to keep that access for future exploitation and assaults by securing their exclusive access with backdoors, rootkits and Trojans.
- Covering tracks : Once hackers have possessed the capacity to pick up and maintain access, they cover their tracks and to keep away from getting detected. This likewise enables them to proceed with the utilization of the hacked framework and keep themselves away from legitimate activities.
This is illustrated best in the following test pyramid:
Example:
Let us understand these three types of testing with an oversimplified example.
E.g. For a functional mobile phone, the main parts required are “battery” and “sim card”.
- Unit testing Example – The battery is checked for its life, capacity and other parameters. Sim card is checked for its activation.
- Integration Testing Example – Battery and sim card are integrated i.e. assembled in order to start the mobile phone.
- Functional Testing Example – The functionality of a mobile phone is checked in terms of its features and battery usage as well as sim card facilities.
- Account/Username
- Password
- Login/Sign in Button
- Field length – username and password fields.
- Input field values should be valid.
- The login button is enabled only after valid values (Format and lengthwise) are entered in both the fields.
- The user sees the welcome message after entering valid values and pushing the login button.
- The user should be navigated to the welcome page or home page after valid entry and clicking the Login button.
- The expected behavior is checked, i.e. is the user able to log in by clicking the login button after entering a valid username and password values.
- Is there a welcome message that is to appear after a successful login?
- Is there an error message that should appear on an invalid login?
- Are there any stored site cookies for login fields?
- Can an inactivated user log in?
- Is there any ‘forgot password’ link for the users who have forgotten their passwords?
Thus, there are a plenty of scenarios that are yet to be tested even after unit and integration testing.
- Unit testing is done before Integration testing by software developers using white box testing techniques.
- Unit testing does not only check the positive behavior i.e. the correct output in case of valid input, but also the failures that occur with invalid input.
- Finding issues/bugs at an early stage is very useful and it reduces the overall project costs. As Unit testing is done before integration of code, issues found at this stage can be resolved very easily and their impact is also very less.
- A unit test tests small pieces of code or individual functions so the issues/errors found in these test cases are independent and do not impact the other test cases.
- Another important advantage is that the unit test cases simplify and make testing of code easier. So, it becomes easier to resolve the issues at a later stage too as only the latest change in the code is to be tested.
- Unit test saves time and cost, and it is reusable and easy to maintain.
There are 3 different types of Integration testing approaches. Let us discuss each one of them briefly:
a) Big Bang Integration Approach
Please do not confuse this approach of integration testing with system testing, only the integration of modules or units is tested and not the whole system as it is done in system testing.
The big bang approach’s major advantage is that everything integrated is tested at one time.
One major disadvantage is that it becomes difficult to identify the failures.
Example: In the figure below, Unit 1 to Unit 6 are integrated and tested using the Big bang approach.
Integration of the units/modules is tested from the top to bottom levels step by step.
The first unit is tested individually by writing test STUBS. After this, the lower levels are integrated one by one until the last level is put together and tested.
The top-down approach is a very organic way of integrating as it is consistent with how things happen in the real environment.
The only concern with this approach is that the major functionality is tested at the end.
Units/modules are tested from bottom to top level, step by step, until all levels of units/modules are integrated and tested as one unit. Stimulator programs called DRIVERS are used in this approach. It is easier to detect issues or errors at the lower levels.
Having had enough discussion about unit testing and integration testing, let us quickly go through the differences between the two in the following table:
Unit Testing | Integration Testing |
---|---|
Tests the single component of the whole system i.e. tests a unit in isolation. | Tests the system components working together i.e. test the collaboration of multiple units. |
Faster to execute | Can run slow |
No external dependency. Any external dependency is mocked or stubbed out. | Requires interaction with external dependencies (e.g. Database, hardware, etc.) |
Simple | Complex |
Conducted by developer | Conducted by tester |
It is a type of white box testing | It is a type of black box testing |
Carried out at the initial phase of testing and then can be performed anytime | Must be carried out after unit testing and before system testing |
Cheap maintenance | Expensive maintenance |
Begins from the module specification | Begins from the interface specification |
Unit testing has a narrow scope as it just checks if each small piece of code is doing what it is intended to do. | It has a wider scope as it covers the whole application |
The outcome of unit testing is detailed visibility of the code | The outcome of integration testing is the detailed visibility of the integration structure |
Uncover the issues within the functionality of individual modules only. Does not exposes integration errors or system-wide issues. | Uncover the bugs arise when different modules interact with each other to form the overall system |
Unit testing | Integration testing | Functional testing | |
---|---|---|---|
Definition and purpose | Testing smallest units or modules individually. | Testing integration of two or more units/modules combined for performing tasks. | Testing the behavior of the application as per the requirement. |
Complexity | Not at all complex as it includes the smallest codes. | Slightly more complex than unit tests. | More complex compared to unit and integration tests. |
Testing techniques | White box testing technique. | White box and black box testing technique. Grey box testing | Black box testing technique. |
Major attention | Individual modules or units. | Integration of modules or units. | Entire application functionality. |
Error/Issues covered | Unit tests find issues that can occur frequently in modules. | Integration tests find issues that can occur while integrating different modules. | Functional tests find issues that do not allow an application to perform its functionality. This includes some scenario-based issues too. |
Issue escape | No chance of issue escape. | Less chance of issue escape. | More chances of issue escape as the list of tests to run is always infinite. |
What is the difference between VA and PT?
Vulnerability Assessment | Penetration testing |
Vulnerability Assessment is an approach used to find flaws in an application/network | It is the practice of finding exploitable vulnerabilities like a real attacker will do |
It is like travelling on the surface | It is digging for gold. |
What is the difference between encryption and hashing?
Encryption | Hashing |
Encryption is reversible | Hashing is irreversible |
Encryption ensures confidentiality | Hashing ensures Integrity |
What is CIA Triad?
- Confidentiality : Keeping the information secret.
- Integrity : Keeping the information unaltered.
- Availability : Information is available to the authorised parties at all times.
A friend of yours sends an e-card to your mail. You have to click on the attachment to get the card.
What do you do? Justify your answer
There are four risks here:
- Some attachments contain viruses or other malicious programs, so just in general, it’s risky to open unknown or unsolicited attachments.
- Also, in some cases just clicking on a malicious link can infect a computer, so unless you are sure a link is safe, don’t click on it.
- Email addresses can be faked, so just because the email says it is from someone you know, you can’t be certain of this without checking with the person.
- Finally, some websites and links look legitimate, but they’re really hoaxes designed to steal your information.
One of the staff members in XYZ subscribes to many free magazines. Now, to activate her subscriptions one of the magazines asked for her month of birth, second asked for her year of birth, the other one asked for her maiden name.What do you infer from this situation? Justify.
All three newsletters probably have the same parent company or are distributed through the same service. The parent company or service can combine individual pieces of seemingly-harmless information and use or sell it for identity theft
In our computing labs, print billing is often tied to the user’s login. Sometimes people call to complain about bills for printing they never did only to find out that the bills are, indeed, correct. What do you infer from this situation? Justify.
Sometimes they realize they loaned their account to a friend who couldn’t remember his/her password, and the friend did the printing. Thus the charges. It’s also possible that somebody came in behind them and used their account
Two different offices on campus are working to straighten out an error in an employee’s bank account due to a direct deposit mistake.
Office #1 emails the correct account and deposit information to office #2, which promptly fixes the problem. The employee confirms with the bank that everything has, indeed, been straightened out.What is wrong here?
Account and deposit information is sensitive data that could be used for identity theft. Sending this or any kind of sensitive information by email is very risky because email is typically not private or secure. Anyone who knows how can access it anywhere along its route.
As an alternative, the two offices could have called each other or worked with ITS to send the information a more secure way.
The mouse on your computer screen starts to move around on its own and click on things on your desktop. What do you do?
a) Call your co-workers over so they can see
b) Disconnect your computer from the network
c) Unplug your mouse
d) Tell your supervisor
e) Turn your computer off
f) Run anti-virus
g) All of the above
This is definitely suspicious. Immediately report the problem to your supervisor and the ITS Support Center:Also, since it seems possible that someone is controlling the computer remotely, it is best if you can disconnect the computer from the network (and turn off wireless if you have it) until help arrives. If possible, don’t turn off the computer.
You receive an email from your bank telling you there is a problem with your account. The email provides instructions and a link so you can log into your account and fix the problem.
What should you do?
Delete the email. Better yet, use the web client (e.g. gmail, yahoo mail, etc.) and report it as spam or phishing, then delete it.
Any unsolicited email or phone call asking you to enter your account information, disclose your password, financial account information, social security number, or other personal or private information is suspicious – even if it appears to be from a company you are familiar with. Always contact the sender using a method you know is legitimate to verify that the message is from them
A while back, the IT folks got a number of complaints that one of our campus computers was sending out Viagra spam. They checked it out, and the reports were true: a hacker had installed a program on the computer that made it automatically send out tons of spam email without the computer owner’s knowledge.How do you think the hacker got into the computer to set this up?
This was actually the result of a hacked password. Using passwords that can’t be easily guessed, and protecting your passwords by not sharing them or writing them down can help to prevent this. Passwords should be at least 8 characters in length and use a mixture of upper and lower case letters, numbers, and symbols.
- Out of date patches/updates
- No anti-virus software or out of date anti-virus software
No comments:
Post a Comment