Cloud Security & IoT Hacking

Part 1: Cloud Security

1. Introduction to Cloud Security

Cloud security is the part of cybersecurity career. Cloud security focuses on protecting data, applications, and infrastructure in cloud environments (AWS, Azure, GCP). Major risks include:

- Misconfigurations (Exposed S3 buckets)

- Insecure APIs

- Account hijacking

- Insider threats


2. Cloud Attack Vectors

A. Storage Bucket Exploitation

- AWS S3 Bucket Enumeration :

  bash

     aws s3 ls s3://bucket-name --no-sign-request    

 Tools : S3Scanner  ,  BucketStream


B. Privilege Escalation

- AWS IAM Misconfigurations :

  bash

    aws iam list-users    

    aws iam list-roles    

  

Tools : Pacu , CloudBrute


C. Serverless (Lambda) Attacks

- Injection in Lambda functions

Tools : Lambda-Proxy , AWS CLI


D. Container & Kubernetes Hacking

- Escaping Docker containers :

  bash

  docker run --privileged -it alpine    

  Tools :  kube-hunter ,  Peirates


3. Cloud Security Tools

| Tool      |     Purpose |

|-----      -|      ---------|

|   ScoutSuite   | Multi-cloud auditing |

|    CloudSploit | AWS/GCP/Azure security checks |

|      Terrascan | IaC (Terraform) security scanner |

|     Kubescape | Kubernetes security |


Part 2: IoT Hacking

1. IoT Attack Surface

- Firmware vulnerabilities

- Insecure APIs (MQTT, CoAP)

- Default credentials ( admin:admin )

- Hardware attacks (UART, JTAG)


2. IoT Hacking Methodology

A. Reconnaissance

-Shodan/FoFa Search :

      shodan search "default password"      

- Firmware Extraction :

  bash

      binwalk -e firmware.bin       

B. Exploitation

- Brute-forcing Telnet/SSH :

  bash

      hydra -l admin -P rockyou.txt 192.168.1.1 telnet        

 -MQTT Exploitation :

  bash

  mosquitto_sub -t "#" -h 192.168.1.100     


C. Hardware Hacking

- UART Pin Extraction :

  - Identify TX/RX/GND pins

  - Connect via USB-to-TTL adapter

- JTAG Debugging :

  - Use  OpenOCD ,  UrJTAG


3. IoT Security Tools

|    Tool   |     Purpose |

|------      |       ---------|

|   Firmware Analysis Toolkit (FAT) | Automated firmware analysis |

| RouterSploit   | IoT exploitation framework |

|   Wireshark     | Network protocol analysis |

|  JTAGulator    | Hardware debugging |


Part 3: Defense Strategies

Cloud Security Best Practices

✔ Enable MFA for all cloud accounts  

✔ Use IAM roles instead of root keys  

✔ Encrypt S3 buckets & EBS volumes  

✔ Monitor with AWS GuardDuty/Azure Sentinel  


IoT Security Best Practices

✔ Change default credentials  

✔ Disable unused services (Telnet)  

✔ Implement firmware signing  

✔ Use VLANs to segment IoT devices  


Hands-On Labs

Lab 1: Hacking an AWS S3 Bucket

1. Find open buckets:

   bash

      aws s3 ls s3:// --no-sign-request      

2. Download files:

   bash

   aws s3 cp s3://bucket-name/file.txt      


Lab 2: Exploiting IoT Camera

1. Find target:

   bash

   shodan search "webcam"

   2. Login with admin:admin

3. Access live feed via /video.mjpg


Conclusion

- Cloud security requires configuration auditing  

- IoT hacking combines network + hardware attacks  

- Defense = encryption + segmentation + monitoring


🔹 Next Steps :  

Module 11: Post-Exploitation & Reporting

- Try  AWS CTF challenges (CloudGoat)  

- Explore IoT villages at DEFCON  

- Learn hardware reverse engineering


🚀 Want a step-by-step walkthrough for hacking a smart bulb? Let me know! 


Social Engineering & Phishing

Introduction to Social Engineering

Social engineering is the part of cybersecurity course and  art of manipulating people into divulging confidential information or performing actions that compromise security. It exploits human psychology rather than technical vulnerabilities.


Why It Works

- 98% of cyberattacks involve social engineering (IBM)

- Humans are the weakest link in security

- Low-cost, high-reward for attackers


Types of Social Engineering Attacks in cybersecurity 

1. Phishing (Most Common)

- Deceptive emails/messages pretending to be legitimate

- Goals: Steal credentials, spread malware, financial fraud

Types:

  - Email phishing (Fake invoices, "urgent" requests)

  - Spear phishing (Targeted at individuals)

  - Whaling (Targets executives)

  - Smishing (SMS phishing)

  - Vishing (Voice call phishing)


2. Pretexting

- Creating a fabricated scenario to obtain information

- Example: "IT support" calling to "verify your password"


3. Baiting

- Offering something enticing (free software, USB drops)

- Often contains malware


4. Quid Pro Quo

- "Exchange" of services (e.g., "free tech support" for login details)


5. Tailgating/Piggybacking

- Physically following someone into restricted areas


Phishing: Step-by-Step Attack Breakdown in cybersecurity course

Phase 1: Reconnaissance

- Research targets (LinkedIn, company website)

- Gather emails (Hunter.io, phonebook)

- Study communication style


Phase 2: Crafting the Attack

A. Email Phishing Example

html

From: "Amazon Support" <support@amazon-security.com>

Subject: Urgent: Unusual Login Attempt


Dear Customer,


We detected a login from Nigeria (IP: 196.xxx.xxx). 

Click here to verify your account: http://amazon-verify.com/login


- Amazon Security Team        


Red Flags:

- Fake domain (`amazon-verify.com`)

- Urgency + fear tactics

- Suspicious link


B. Clone Phishing

1. Hack a real email thread

2. Replace attachments/links with malicious ones


Phase 3: Delivery

- Send via email, SMS, or social media

- Use URL shorteners (bit.ly) to hide malicious links

- Spoof sender addresses (Easy with SMTP)


Phase 4: Exploitation

- Fake login pages (Steal credentials)

- Malware downloads (RATs, keyloggers)

- Financial scams (Gift cards, wire transfers)


Phase 5: Post-Attack

- Cover tracks (Delete logs)

- Sell data on dark web

- Use credentials for further attacks


Tools Used in Phishing

| Tool | Purpose |

|------|---------|

|    Gophish    | Open-source phishing framework |

|  SET (Social Engineer Toolkit)  | Automated phishing attacks |

|   King Phisher  | Realistic phishing campaigns |

|   Evilginx2        | Advanced phishing (MFA bypass) |

|  GoPhish           | Email template cloning |


How to Defend Against Social Engineering For Individuals:

✔ Verify sender emails (Check domain spelling)  

✔ Hover over links before clicking  

✔ Enable MFA (Blocks 99% of phishing)  

✔ Don’t trust urgency/fear messages  

✔ Report suspicious emails to IT  


For Organizations:

✔ Employee training (Phishing simulations)  

✔ Email filtering (Mimecast, Proofpoint)  

✔ DMARC/DKIM/SPF (Prevent email spoofing)  

✔ Web filtering (Block malicious sites)  

✔ Incident response plan  


Ethical Phishing Testing in cybersecurity course

Steps for Legal Phishing Tests:

1. Get written permission  

2. Use simulated domains (e.g., `company-security-test.com`)  

3. Provide training after tests  

4. Never steal real data  


Tools for Security Awareness:

- KnowBe4 (Phishing simulations)  

- PhishMe (Now Cofense)  

- Microsoft Attack Simulator  


Real-World Case Studies

1. 2016 DNC Hack (Russian spear phishing)  

2. Twitter Bitcoin Scam  (Celebrity accounts hacked via vishing)  

3. Colonial Pipeline Attack (Compromised VPN via leaked password)  


Conclusion

- Social engineering exploits human trust  and best part of cybersecurity course

- Phishing is the #1 attack vector (FBI IC3 Report)  

- Defense requires awareness + technology  


🔹 Next Steps:

Module 10: Cloud Security & IoT Hacking   

- Try ethical phishing labs (TryHackMe)  

- Learn OSINT techniques for reconnaissance  

- Explore dark web monitoring tools  


🚀 Want a hands-on phishing lab walkthrough? Let me know!