GTU IT Sem 5 Cyber Security Notes For Revision
- Vulnerability : A flaw or loophole in system that can be exploited by people with bad intentions.
- Pen-testing : penetration testing is process of finding loopholes /Vulnerabilities in a system.
- Total ports : 0 to 65535
- Important port number and services associated with it.
a. 21 - FTP
b. 22 – SSH
c. 23 - TELNET
d. 25 – SMTP
e. 53 – DNS
f. 67 – DHCP
g. 80 – HTTP
h. 143 – IMAP
i. 443 – HTTPS - Port states :
a. Open – open for connections
b. Closed – closed
c. Filtered – filters are there; Only selected traffic - Port scanning techniques.
a. TCP
b. UDP
c. Vanilla
d. ARP
e. TCP SYN
f. TCP FIN
g. TCP ACK
h. ICMP - OpenVAS :
a. Full form : OPEN Vulnerability Assessment Scanner
b. Default Port : 9390
c. Language : Nessus Attack Scripting Language(NASL)
d. Work : scans website/host for possible vulnerabilities and suggests how to fix that.
e. 35,000 + NVTs (Network Vulnerability Tests)
f. Comes with a GUI (Graphical user interface) - Matasploit :
a. Open source
b. Used to prepare payloads for post exploitation.
c. Source code language : Ruby
d. Uses PostgreSQL database
e. Pre-installed in most UNIX
f. Commands:
i. Connect
ii. Search
iii. Session
iv. Show - Socket : endpoint of system used to communicate between same application or between two applications, useful for building API(Application Programming Interface)
Netcat : multi purpose tool
a. Can be used as port scanner, backdoor creation, port redirector, port listener or file transfer.
b. Pre-installed with mostly Linux distributions.
c. Syntax : nc –[option] [host] [port]
d. Main options :
i. -v : verbose mode to display whatever is happening in background
ii. -l : puts nc in listening mode
iii. -p : specifies port number
iv. -u : makes UDP scanDatapipe : port redirection tool mainly for UNIX
- Fpipe,winrelay : port redirection tool for windows
- Nmap : Network Mapper
a. Network reconnaissance tool
b. Creator : Gorden Lyon(Fyodor)
c. Features : port scanning, OS detection, service identification, host discovery
d. Pre-installed in Linux
e. GUI available as Zenmap
f. Open-source
g. Written in c, c++ & Python
h. Basic options
i. -v : verbose mode to output whatever is happening in background
ii. -sP : ping scan
iii. -Pn : basic port scanning
iv. -sV : OS version detection
v. -sU : UDP scan
vi. -A : aggressive scan - Whois : Domain lookup tool; provides details about specific domain name.
- TCPdump & windump : packet capturing tools
- Wireshark : packet capturing tool
a. Pre-installed in Linux
b. Provides GUI
c. Can apply different filters
d. Released in 1998 as ethereal in 2006 named as wireshark. - Ettercap : used for MITM(Man In The Middle) attack on LAN
- Hping : Packet generation tool; used to perform DOS attack
- Kismat : wireless network detector and attacker tool; can be used as pen-testing purposes
- Firewall : Network device used as protection from outside attacks.
a. Packet filter : filters traffic on packet base, works on network layer, can use different protocols to filter e.g. allow SMTP or block FTP
b. Circuit firewall : On transport layer, monitors connections also sets timeout if needed
c. Application level : on Application level, most secure firewall, time consuming and slow, create proxy type environment. - NAT(Network Address Translation) : conversion of public IP from Private IP address, used IP pool, hides internal network from outside.
- Snort : IDS(Intrusion Detection System)
a. Network based : monitors whole networks and look for suspicious activity.
b. Host-based : monitors internal computers for suspicious activity.
c. Components : packet decoder, preprocessor, detection engine, alert system, output modules
d. Free and open source. - Nikto : web security assessment tool
a. In perl language
b. Free and open source
c. Supports openssl - W3af : web application attack and audit framework
a. Free and open source
b. Runs on python - CURL : used to fetch webpages and other online resources
- OpenSSL : open source implementation of SSL(Secure Socket Layer) and
TLS(Transport Layer Security)
a. Used for
i. generating keys for RSA/DSA
ii. create X.509 certificates,
iii. message digest calculations
iv. SSL/TLS client – server tests
v. Working with ciphers - Stunnel : secure tunnel; Provides SSL/TLS tunnel between applications
- ZAP(Zed Attack Proxy) : penetration testing tool for web applications
a. Supports HTTP and HTTPS
b. Written in JAVA
c. Free and open source
d. Easy to install and use
e. Cross platform
f. Supports spidering - Sqlmap : detects SQL injection vulnerabilities from web applications.
a. Written in Python
b. Free and open source
c. Support time-based, Union query-based, error-based and out-of-bound
d. Easy to use
e. Fully automated DVWA : Damn Vulnerable Web Application
a. Free and open source
b. Used to simulate web application vulnerabilities to test skills
c. Comes with database
d. Supports
i. Sql injection
ii. Command injection
iii. Bruteforce login
iv. CSRF
v. File injection
vi. Cross site scripting
e. Works with APACHE server- Webgoat : web application to teach security lessons
a. Maintained by OWASP
b. APACHE tomcat
c. Default port 80 - John the ripper : password cracking tool
a. Pre-installed in Linux
b. Supports many hash algorithms
c. Fast
d. Cracking modes
i. Wordlist
ii. Single crack mode
iii. Incremental mode
iv. External mode - L0phtcrack : password cracking tool; extracts passwords from local and remote computers.
- Hydra : password cracking tool for online platforms.
- Cyber crime : any type of crime done by using computers.
- Cyberspace : work space created by attacker
- Digital forensics : act of gathering information and data and analyzing them.
- Steps in digital forensics :
a. Preservation
b. Collection
c. Examination
d. Analysis - Key loggers : software or hardware created to monitor every key stroke of keyboard.
- Data acquisition : process of acquiring data from a computer
- Virus : is a malicious code created to harm computer or computers.
a. Need host to run it self
b. Phases : dormant, propagation, triggering, Execution
c. Types : boot sector, file infector, append, integrated, document, macro, memory resident, E-mail, stealth, multipart - Worm : created with intension of spreading only.
a. Spreads it self in network itself
b. Do not need host
c. Create copies of self
d. Mostly used to create botnets - Trojan horse : Legitimate looking software with malicious code that gets installed with software it self.
- Backdoors : loop holes created by attacker to have access of the system later on that allows remote access.
- Steganography : art of hiding information inside file, photos, videos, audios etc.
- DOS &DDOS attacks : overwhelming victim with so many requests that it is unable to respond to legitimate user.
- SQL injection : attack performed by taking advantage of SQL vulnerability in a
website.
a. Prevention
i. Use prepared query
ii. Validate inputs
iii. Input limits
iv. Limits database permission - Buffer overflow : attack performed by taking advantage of buffer overflow weakness in a website, e.g. stack(buffer) “A” stores integer value of 40 bytes if more than 40 bytes of data is given as input it will overflow and will try to overwrite the memory.