Data and network security MIT Notes
CIA model (Confidentialy ,Integrity & Availability)
- Confidentialy: security focus, means information is not available for unauthorized access
- Integrity: accuracy & completeness focus, means information is not modified by unauthorized access
- Availability: availabilty focus, means data is available when authorized access
Attack Process (MOM)
- Mehod:
- Ability: if wifi security is wep, it can be hacked
- Information: some weekness, ie free internet use
- Tools: by using tools
- Oppurtunity: work for some time& access ie we now by default wifi has 12345678 password so we can use it
- Motive: fun,finance,penteration (testing) ,etc
Types of attack
- Active: to alter system resourses
- Masqurade attack: use fake identity to gain unauthorized access
- DOS attack: atack an system to provoide its services to its users
- Passive: to learn for system but not effect the system
- Traffic Analysis: Read whole trafic
- Release of message: specific data read ie alert (beep) when ATM byte received
Defence methods
- Physical control ie use locker
- Hardware control use biometric for open system
- Software control use password
- Encription ie use A ? D +2
Network security
- Cryptography: use data conversion ie represent Rizwan as u98ujl
- Stengnography use data hiding ie hide rizwan to an image
Encriptions
- DES: attach image here
- AES: attach image here
Website hacking
- Cross site scripting: in message add html,js code
- SQL Injection: wrong sql queries
- Remote file Inclusion: Shell code to access web server
- DDOS: block access of a website
- Broute fource: all possible combination to access
Internet security
- Layers: secure your layers (network, transport,application etc)
SIR USAMA
Subnetting
- Logical subdivision of IP (host portion) is called subnetting
- IP ? Network+hosts/routingPrefix(CIDR) ie 192.168.1.0/24 24 bits for network and 8 bits for hosts
- each subnet must have unique CIDR, if same Router can't communicate with subnets
- ie 192.168.1.0/24 to 192.168.1.220/24 communication done because no subnet maked
- 192.168.1.19/25 is a network, 192.168.1.220/24 is other network, we need router
- USE of subnetting: Save addresses
- Classfull vs classless subnets
| classfull | classless |
|---|---|
| No subnets, cidr is 8,16,24 | subnets maked,cidr is >8,>16,>24 |
- VLSM (variable length subnet mask) each subnet has different sized of hosts
- FLSM (fixed length subnet mask) each subnet have same no of ip's
- Mininum no of hosts for class c ip address? 192.168.1.0/30 means 30 bits for network and 2 for hosts 22=4 one for network, one for subnet mask, and two hosts
- Max no of hosts for class c ip address? 28-2 , excluded 2 are subnet mask and network
Class Max hosts Min hosts Range Stat Binary A 224-2 224-222-2 0-127 N.H.H.H 00000000 - 01111111 B 216-2 216-214-2 128-191 N.N.H.H 10000000 - 10111111 C 28-2 28-26-2 192-223 N.N.N.H 11000000 - 11011111 D 224-239 for multicast 11100000 - 11101111 E 240-255 for experiments 11110000 - 11111111
An example, we need 4 networkd using VLSM
| 61 hosts | 29 hosts | 13 hosts | 5 hosts |
| 26=64 ie 192.168.1.0/26 to 192.168.1.63/26 | 25=32 ie 192.168.1.64/27 to 192.168.1.95/27 | 24=16 ie 192.168.1.96/28 to 192.168.1.111/28 | 23=8 ie 192.168.1.112/29 to 192.168.1.119/29 (verfy it) |
How to find prefix
192.168.1.100/?
- 26=64 and 27=128 we now 64<100<128
- 27 so 32-7=25 is prefix
- 192.168.1.100/25
Available subnets
for class C
- 192.168.1.1/24 2CDIR-24 as 224-24=20=1 only one subnet
- 192.168.1.122/26 Find 2CDIR-24 as 226-24=22=4 four subnet
Subnetting
- convert ip address into binary
- check class of ip address and write binary of class
- Multiply both ip address bits and save the result
- Now depends on how many branches needs, make bits ie if 6 branches then 23=8
- assign first group of bits to left side of binary (red part)
- make subnets for 172.172.172,172 for 6 branches
| 1.Binary of 172.172.172.172 | 10101100.10101100.10101100.10101100 |
| 2.Class of ip is B, so binary of class B is | 11111111.11111111.00000000.00000000 |
| 3.Muliplication of 1,2 is | 10101100.10101100.00000000.00000000 |
| we need 6 branches so 23=8 | 000 001 010 011 100 101 110 111 |
| this is first subnet, 172.172.0.0/19 (172.172.0.0 net id to 172.172.31.255 broadcast id) | 10101100.10101100.00000000.00000000 |
| this is 2nd subnet ,172.172.32.0/19 | 10101100.10101100.00100000.00000000 |
| this is last subnet |
TCP/IP layers
- Application layer:messages + programs interfaces use this (application +prsentation+session) ie http,ftp etc
- transport layer: add headers and connection status, ie port numbers
- network layer: ip address, use Router
- datalink layer: use mac address on switch
- physical layer: binary maked to travel on wires
- Every card (Bluetooth ,wifi) has its individual mac address A pc use all 5 layers so it can be maked router or switch
Switching
Networks
- broadcast: send info one to all other i.e send sms to all world
- multicast: send one to more than one ie group sms
- unicast: sned info one to one ie chat with friend
- anycast: used in routers?
Bus topology
- Wired: CSMA/CD?
Network Cores
- Network Edges
- end points,ie Sender & receiver for example ATM,
- Network Cores:
- Intermediat devices amoung edges ie switch,hub,router.
- Circut switching:
- Communication that have dedicated link
- packet switching
- use shared link for communication
- Physical communication
- That use network (IP) + datalink (mac) + physical layer.
- Logical communication
- that uses transport (for port) & application layer (for url).
- To send email following protocols used
- SMTP ? FTP ? TCP/UDP ? IP
- Data link layer connectives
- Upper:Logical Link control (LLC) Lower:Media access control (MAC)
- Gateway
- a device used to connect two different networks, especially a connection to the Internet.