Complete guide to cybersecurity concepts – click a topic to jump
What is Cybersecurity? Cybersecurity is the practice of protecting systems, networks, programs, and data from digital attacks, unauthorized access, and damage. It involves technologies, processes, and controls designed to ensure confidentiality, integrity, and availability of information.
Why is it important? With increasing reliance on technology, cyber threats have become more sophisticated, leading to financial losses, privacy breaches, and national security risks. Cybersecurity helps mitigate these threats.
साइबर सुरक्षा क्या है? यह कंप्यूटर सिस्टम, नेटवर्क, और डेटा को डिजिटल हमलों से बचाने का तरीका है। इसका उद्देश्य डेटा की गोपनीयता, अखंडता और उपलब्धता सुनिश्चित करना है।
महत्व: आजकल सब कुछ डिजिटल हो गया है, साइबर हमलों से बचाव जरूरी है ताकि डेटा चोरी, वित्तीय नुकसान या निजता भंग न हो।
# Cybersecurity domains: Network security, Application security, Cloud security, Incident response, etc.
Confidentiality: Ensuring data is accessible only to authorized users. (e.g., encryption, access controls)
Integrity: Maintaining accuracy and trustworthiness of data. (e.g., hashing, checksums)
Availability: Ensuring data and services are available when needed. (e.g., redundancy, DDoS protection)
Confidentiality (गोपनीयता): डेटा सिर्फ अधिकृत लोग ही देख सकें। जैसे एन्क्रिप्शन।
Integrity (अखंडता): डेटा सही और बिना बदलाव के हो। जैसे हैशिंग।
Availability (उपलब्धता): जरूरत पड़ने पर डेटा और सेवाएँ उपलब्ध हों। जैसे बैकअप, डीडीओएस सुरक्षा।
# Example: Encrypting a file (confidentiality) openssl enc -aes-256-cbc -in secret.txt -out secret.enc # Example: SHA-256 hash (integrity) sha256sum secret.txt
# Example: Simulate a simple DDoS (for educational only) # hping3 -S --flood -V -p 80 target_ip
A vulnerability is a weakness in a system that can be exploited. An exploit is a method or code that takes advantage of a vulnerability. Common sources: software bugs, misconfigurations, weak passwords. Vulnerability databases: CVE, NVD.
Vulnerability सिस्टम में कमजोरी होती है, जैसे सॉफ्टवेयर बग या गलत कॉन्फ़िगरेशन। Exploit उस कमजोरी का फायदा उठाने का तरीका। CVE डेटाबेस में सार्वजनिक कमजोरियाँ सूचीबद्ध होती हैं।
# Check for known vulnerabilities in packages (Linux) apt list --upgradable # Use tools like OpenVAS, Nessus for scanning
Risk = Threat × Vulnerability × Impact. Risk management involves identifying assets, assessing threats and vulnerabilities, determining the level of risk, and implementing controls to mitigate it. Common frameworks: NIST RMF, ISO 27005.
जोखिम = खतरा × कमजोरी × प्रभाव। जोखिम प्रबंधन में संपत्तियों की पहचान, खतरों का आकलन, और उन्हें कम करने के उपाय शामिल हैं।
# Example: Risk matrix Likelihood (Low, Medium, High) × Impact (Low, Medium, High) = Risk Level
Cryptography is the practice of secure communication in the presence of adversaries. It provides confidentiality, integrity, authentication, and non-repudiation. Basic concepts: plaintext, ciphertext, encryption, decryption, keys.
क्रिप्टोग्राफी से डेटा को गुप्त रखा जाता है। इसमें प्लेनटेक्स्ट को एन्क्रिप्शन की मदद से सिफरटेक्स्ट में बदलते हैं और की से वापस डिक्रिप्ट करते हैं।
# Caesar cipher (simple shift) echo "HELLO" | tr 'A-Z' 'D-ZA-C' # shifts by 3: KHOOR
Symmetric: Same key for encryption and decryption (e.g., AES, DES). Fast but key distribution problem.
Asymmetric: Key pair: public (encrypt) and private (decrypt) – e.g., RSA, ECC. Solves key distribution but slower. Often used with symmetric for efficiency (hybrid cryptosystems).
Symmetric: एक ही की से एन्क्रिप्ट और डिक्रिप्ट (जैसे AES)। तेज है, लेकिन की दूसरे तक पहुँचाना मुश्किल।
Asymmetric: दो की – पब्लिक (एन्क्रिप्ट) और प्राइवेट (डिक्रिप्ट) – जैसे RSA। धीमा है लेकिन की डिस्ट्रीब्यूशन आसान।
# Generate RSA key pair (OpenSSL) openssl genrsa -out private.pem 2048 openssl rsa -in private.pem -pubout -out public.pem # Encrypt with public key echo "secret" | openssl rsautl -encrypt -pubin -inkey public.pem > encrypted.dat
Hash function: One-way function producing fixed-size output (digest). Properties: deterministic, fast, preimage resistant, collision resistant. Examples: SHA-256, MD5 (broken).
Digital signature: Combines hash with asymmetric encryption to prove authenticity and integrity. Sender signs hash with private key; receiver verifies with public key.
हैश फंक्शन: किसी भी डेटा से एक निश्चित आकार का अनूठा कोड बनाता है, जैसे SHA-256। इससे डेटा की अखंडता जाँची जा सकती है।
डिजिटल हस्ताक्षर: प्राइवेट की से हैश को साइन करना, ताकि पब्लिक की से कोई भी सत्यापित कर सके कि डेटा प्रामाणिक है।
# SHA-256 hash echo -n "Hello" | sha256sum # Create a signature (using OpenSSL) openssl dgst -sha256 -sign private.pem -out sig.bin file.txt # Verify openssl dgst -sha256 -verify public.pem -signature sig.bin file.txt
PKI is a framework for managing digital certificates and public-key encryption. It includes Certificate Authorities (CAs) that issue certificates binding public keys to identities. Used for SSL/TLS, email signing, code signing.
PKI डिजिटल सर्टिफिकेट के प्रबंधन का ढांचा है। CA (Certificate Authority) सर्टिफिकेट जारी करता है जो पब्लिक की को किसी पहचान (जैसे वेबसाइट) से जोड़ता है। HTTPS इसी पर आधारित है।
# Generate a self-signed certificate (for testing) openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
Firewall: Filters traffic based on rules (packet filtering, stateful, application layer). Can be hardware or software.
IDS/IPS: Intrusion Detection/Prevention Systems monitor traffic for malicious patterns and can alert or block. Examples: Snort, Suricata.
Firewall: नियमों के आधार पर नेटवर्क ट्रैफिक को रोकता या अनुमति देता है।
IDS/IPS: नेटवर्क पर नज़र रखता है और खतरनाक गतिविधि दिखने पर अलर्ट या ब्लॉक करता है।
# iptables example (block incoming SSH except from specific IP) iptables -A INPUT -p tcp --dport 22 -s 192.168.1.100 -j ACCEPT iptables -A INPUT -p tcp --dport 22 -j DROP
SSL/TLS protocols provide encryption and authentication for web traffic. HTTPS is HTTP over TLS. Prevents eavesdropping, tampering, and man-in-the-middle attacks. Websites need a valid certificate from a CA.
SSL/TLS वेब ट्रैफिक को एन्क्रिप्ट करता है। HTTPS का मतलब HTTP + TLS है। इससे आपका डेटा सुरक्षित रहता है और कोई बीच में नहीं पढ़ सकता।
# Check SSL certificate details openssl s_client -connect google.com:443 -servername google.com
Authentication verifies identity. Factors: Something you know (password), something you have (token, phone), something you are (biometrics). Multi-Factor Authentication (MFA) uses two or more factors for stronger security.
प्रमाणीकरण से पहचान सत्यापित होती है। तीन प्रकार: ज्ञान (पासवर्ड), स्वामित्व (ओटीपी, टोकन), और अस्तित्व (फिंगरप्रिंट)। MFA में एक से अधिक तरीके इस्तेमाल होते हैं।
# Example: Google Authenticator TOTP (Time-based One-Time Password)
# Implemented via libraries like pyotp
import pyotp
totp = pyotp.TOTP('base32secret')
print(totp.now())
DAC (Discretionary): Owner decides access (e.g., file permissions).
MAC (Mandatory): System-enforced based on labels (e.g., SELinux).
RBAC (Role-Based): Access based on roles (e.g., admin, user).
DAC: फ़ाइल का मालिक तय करता है किसे क्या एक्सेस मिले।
MAC: सिस्टम नियंत्रित करता है, SELinux की तरह।
RBAC: भूमिका (जैसे प्रबंधक, कर्मचारी) के आधार पर एक्सेस।
# Linux file permissions (DAC) chmod 600 secret.txt # owner read/write only chown alice:alice secret.txt
Policies are formal documents outlining security rules (e.g., acceptable use, password policy, data classification). Procedures are step-by-step instructions for implementing policies. Essential for compliance and consistent behavior.
नीतियाँ (policies) संगठन में सुरक्षा नियमों को परिभाषित करती हैं, जैसे पासवर्ड नीति। प्रक्रियाएँ (procedures) उन नियमों को लागू करने के तरीके बताती हैं।
# Example password policy snippet - Minimum length: 8 characters - Must contain uppercase, lowercase, number, special character - Change every 90 days
IR is a structured approach to handle security incidents. Phases: Preparation, Identification, Containment, Eradication, Recovery, Lessons Learned. Having a Computer Security Incident Response Team (CSIRT) is crucial.
घटना प्रतिक्रिया के चरण: तैयारी, पहचान, रोकथाम, समस्या दूर करना, सामान्य स्थिति में लाना, और सीख। CSIRT टीम इसे संभालती है।
# Incident response checklist 1. Identify: Is it a real incident? 2. Contain: Isolate affected systems. 3. Eradicate: Remove malware, patch vulnerabilities. 4. Recover: Restore from clean backups. 5. Post-mortem: Document and improve.
Malware analysis studies malicious software to understand its behavior and origin. Two approaches: static analysis (examining code without execution) and dynamic analysis (running in a sandbox). Tools: strings, disassemblers (IDA Pro), debuggers (x64dbg), sandboxes (Cuckoo).
मैलवेयर विश्लेषण से समझते हैं कि मैलवेयर कैसे काम करता है। स्टैटिक (बिना चलाए कोड देखना) और डायनमिक (सुरक्षित वातावरण में चलाकर)।
# Simple static analysis: strings strings suspicious.exe | grep -i "http"
Penetration testing (pentesting) is authorized simulated attacks to evaluate security. Phases: reconnaissance, scanning, exploitation, post-exploitation, reporting. Common tools: Nmap, Metasploit, Burp Suite, Wireshark.
पैनेट्रेशन टेस्टिंग में सुरक्षा कमजोरियों का पता लगाने के लिए नकली हमले किए जाते हैं। Nmap, Metasploit जैसे टूल्स इस्तेमाल होते हैं।
# Nmap scan example nmap -sS -sV -p 1-1000 target_ip
ISO 27001: International standard for Information Security Management System (ISMS). Provides requirements for establishing, implementing, and improving an ISMS.
NIST Cybersecurity Framework: Framework with five core functions: Identify, Protect, Detect, Respond, Recover. Widely used in the US.
ISO 27001: सूचना सुरक्षा प्रबंधन का अंतर्राष्ट्रीय मानक।
NIST: पाँच कार्यों वाला ढांचा: पहचान, सुरक्षा, पता लगाना, प्रतिक्रिया, पुनर्प्राप्ति।
# ISO 27001 domains include: Access Control, Incident Management, etc.
Data protection laws regulate how personal data is collected, processed, and stored. GDPR (EU) gives individuals rights over their data (right to access, erasure). Similar laws: India's Digital Personal Data Protection Act, etc. Organizations must implement privacy policies, data minimization, and breach notification.
डेटा संरक्षण कानून (जैसे GDPR) व्यक्तिगत डेटा के संग्रह और प्रसंस्करण को नियंत्रित करते हैं। व्यक्तियों को अपने डेटा पर नियंत्रण के अधिकार मिलते हैं।
# GDPR principles: - Lawfulness, fairness, transparency - Purpose limitation - Data minimization - Accuracy - Storage limitation - Integrity and confidentiality
Cloud Security: Shared responsibility model. Securing cloud infrastructure (IaaS, PaaS, SaaS) involves identity management, encryption, compliance (e.g., AWS security groups, Azure Security Center).
IoT Security: Billions of connected devices pose challenges: weak authentication, lack of updates, privacy concerns. Security must be built in.
AI/ML in security: Used for threat detection, anomaly detection, but also can be used by attackers.
क्लाउड सुरक्षा: क्लाउड प्रदाता और ग्राहक के बीच साझा जिम्मेदारी।
IoT सुरक्षा: इंटरनेट से जुड़े उपकरणों में कमजोर पासवर्ड, अपडेट की कमी जैसी चुनौतियाँ।
AI/ML: खतरों का पता लगाने में मदद, लेकिन हमलावर भी AI का उपयोग कर रहे हैं।
# Example: AWS S3 bucket policy (security)
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::mybucket/*",
"Condition": {
"Bool": {"aws:SecureTransport": "false"}
}
}
]
}
16. Social Engineering / सामाजिक इंजीनियरिंग
English
Social engineering manipulates people into divulging confidential information or performing actions. Common techniques: phishing, pretexting, baiting, tailgating. Awareness training is the best defense.
सरल हिंदी
सामाजिक इंजीनियरिंग में लोगों को धोखा देकर गोपनीय जानकारी ली जाती है। फ़िशिंग, बहाना बनाना, आदि। इससे बचाव के लिए जागरूकता जरूरी है।