- SSH: It's an encrypted application and it's used to log in into different servers and it exhanging a public and private key in order to authenticate.
- TLS (Transport Layer Security): It is a protocol that creates an encryption layer between the servers and the client requesting to visit the website, fixing the non-encrypted HTTP.
OSI Model
- Physical Layer.
- Ex: Types of Cables to use.
- Data Link Layer.
- Everything that works with a MAC adress.
- Network Layer.
- IP Adressees. Ex: Routers.
- Transport Layer.
- Assembles and disassembles packets.
- Session Layer.
- Actual conexion between two systems like TCP.
- Presentation Layer.
- Used to convert data into a format that your applications can read.
- Application.
TCP/IP Model
- Network Interface.
- Covers all the physical cabling, MAC adresses, network cards, pretty much everything in terms of hardware.
- Internet.
- This Layer is for anything it has to do with an IP adress, for example a router.
- Transport.
- Application.
IP adresses
- IPV-4 -> EX. 172.16.254.1
- IPV-6 -> EX. 2001:0DB8:85A3:0000:8A2E:0370:7334 (128 bits)
Private IP adress
- Any IP adress that starts with the number 10.
- Any IP adress that ranges from 172.16 - 172.31.
- Any IP adress that starts with 192.168.
Transport Protocols
- TCP: Connexion oriented type of protocol (client sends request to server and server sends response), can send a lot of packages and it is how the internet works.
- UDP: Connectionless (sends one packet to the server with no response).
- ICMP: supports TCP and UDP protocols, handles ARP and ping.
Internet Protocols
- HTTP: Using TCP port 80, it is for unsecure websites.
- HTTPS: Using TCP port 443, secure websites.
Remote Shell
- Telnet: Using TCP port 23, very insecure.
- SSH: Using TCP port 22, secure shell.
File Transfer
- FTP: File transfer protocol using ports 20-21, completely insecure.
- FTP/SSH: Using FTP over a SSH conexion using port 22.
- FTPS: Using ports 20-21, using TLS encryption and it is very secure.
- SFTP: SSH File Transfer Protocol uses port 22.
- SCP: Secure Copy moves files across systems uses port 22.
- TFTP: Trivial FTP uses UDP port 69.
- NETbios: Using port 137,138,139 but more modern ones use SMB(running on port 445).
- SMTP: Simple Mail Transfer Protocol, uses port 25 (sends mail to other people).
- IMAP: Internet Message Access Protocol (recieves mail), uses port 143.
- POP: Older protocol but quite popular, uses port 110.
Others
- DNS: Domain Name System, uses port 53.
- DHCP: Dynamic Host Configuration Protocol, uses UDP port 67/68.
- SNMP: Simple Network Management Protocol, uses UDP ports 161/162.
- LDAP: Light Weight Directory Access Protocol, uses port 389.
- RDP: Remote Desktop Protocol, uses tcp port 3389.
SSL: Secure Sockets Layer was developed to establish secure conexions between two points.
SSL/TLS are used in HTTPS
DNS: Runs in port 53 and is a nonsecure protocol.
DNSSEC: Use public and private key to connect and prevent the spoofing of packets from an evil person.
Always use secure protocols
Because encrypting&decrypting consumes a lot of cpu usage and can easily burn one, we are going to need to take some measures in order to prevent that.
SSL Accelerator Card: These cards instantly encrypts & decrypts asymmetric encryption.
Load Balancer: Distributes all the requests coming from a website to different web servers to improve the performance.
DDOS Mitigator: will send out an alert to emergency response services which assist in traffic flow to the site under attack.
Waterfall Model
- Requirements.
- Design.
- Implementation.
- Verification.
- Maintenance.
Agile Methodology
Agile and Flexibile methodology to get software out of the door.
DevOps
We include Development and Operations in a plan.
PLAN -> CREATE -> VERIFY -> PACKAGE -> RELEASE -> CONFIGURE -> MONITOR -> PLAN ...
- Secure Development Operations:
- Security automation tools.
- Change management/version control.
- Baseline (Crytical Security Objectives).
- Consider immutable systems.
- Infrastructure as code.
- Proper error handling is absolutely critical.
- Proper input validation.
- In case someone enters malicious code inside an email input or so.
- Normalization.
- Stored procedures is going to prote ct databases.
- Encryption/code signing.
- We digitally sign our code.
- Obfuscation.
- Using minifiers to make our code difficult to understand and rerse enginer.
- Reuse Code and get rid of dead code.
- Server-side vs. client-side execution.
- Memomry management.
- Be careful with third party library vulnerabilities and keep them always up to date.
- Data Exposure, our jobs as developers is to reduce the exposure of code or private information so: use lots and lots of encryption.
Once your code is developed, the first thing you are going to want to do is test your code.
Static code analyzers: they look through the code and find standart type of errors that often developers do. It just reads the code doesn't run it.
Dynamic code analysis: It actually runs the code in order to find logic errors, security holes, typing in SQL injections, memory leak...
Staging: Start to create more and more realistic world environments to see how your code performs in thos kind of situations.
Stress test: Do a test to see if there's a memory leak or if the databases can keep up, etc.