Translate

Wednesday, 14 January 2026

Master Git Log in Telugu: Never Lose Your Code Again! 06

 The git log command is one of the most essential tools in Git. It allows you to view the commit history of a repository, showing you who made changes, when they made them, and what message they included.

Think of it as a "journal" or "timeline" of your project's life.


1. Basic Usage

Master Git Log in Telugu: Never Lose Your Code Again! 06


When you run the command without any arguments, it shows the history in reverse chronological order (newest first).

Bash
git log

What you will see:

  • Commit Hash: A unique 40-character string (SHA-1) that identifies the commit.

  • Author: The name and email of the person who made the change.

  • Date: When the commit was created.

  • Commit Message: The description provided by the author.


2. Common Variations (Examples)

Sometimes the default output is too long or contains too much information. You can use flags to filter or format the output.

A. One-Line Summary

If you want a quick overview of many commits at once, use --oneline. It condenses each commit to a single line showing just the short hash and the message.

Bash
git log --oneline

B. Limiting the Number of Commits

To see only the last 3 commits:

Bash
git log -n 3

C. Showing Changes (Patch)

If you want to see the actual code changes (the "diff") introduced in each commit:

Bash
git log -p

D. Visualizing Branches (The Graph)

In complex projects with many branches, this command shows a visual ASCII graph of how branches merge and diverge.

Bash
git log --oneline --graph --all

3. Filtering the History

You can also search for specific commits based on different criteria:

RequirementCommand
By Authorgit log --author="John"
By Dategit log --since="2 weeks ago"
By Messagegit log --grep="fix bug"
By Filegit log -- index.html (only shows changes to that file)

Summary Checklist

  • Purpose: View the history of the project.

  • Key Info: Who, when, and what was changed.

  • Navigation: When viewing a long log, use the Arrow Keys to scroll and press q to quit and return to the terminal.


Git లో git log అనేది మీ ప్రాజెక్ట్ యొక్క చరిత్రను (Commit History) చూడటానికి ఉపయోగపడే అతి ముఖ్యమైన కమాండ్. మీ ప్రాజెక్ట్‌లో ఎవరెవరు మార్పులు చేశారు, ఎప్పుడు చేశారు మరియు ఆ మార్పుల ఉద్దేశ్యం ఏమిటి అనేది ఇది ఒక "డైరీ" లేదా "టైమ్‌లైన్" లాగా చూపిస్తుంది.


1. ప్రాథమిక ఉపయోగం (Basic Usage)

మీరు టెర్మినల్‌లో ఈ కమాండ్ టైప్ చేసినప్పుడు, ఇటీవల జరిగిన మార్పుల నుండి పాత వాటి వరకు వరుసగా కనిపిస్తాయి.

Bash
git log

ఇది చూపే వివరాలు:

  • Commit Hash: ప్రతి మార్పుకు కేటాయించిన ఒక యూనిక్ ఐడెంటిఫికేషన్ నంబర్ (ఉదా: 40 అక్షరాల SHA-1 స్ట్రింగ్).

  • Author: మార్పు చేసిన వ్యక్తి పేరు మరియు ఈమెయిల్.

  • Date: ఆ మార్పు ఏ రోజు, ఏ సమయానికి జరిగిందో చూపిస్తుంది.

  • Commit Message: ఆ మార్పు గురించి డెవలపర్ రాసిన వివరణ.


2. ముఖ్యమైన ఉదాహరణలు (Common Examples)

కొన్నిసార్లు పూర్తి సమాచారం అవసరం లేనప్పుడు, ఈ క్రింది రకాలుగా git logను వాడవచ్చు:

A. ఒక్క లైన్ లో చూడటానికి (One-Line Summary)

చాలా కమిట్స్ ఉన్నప్పుడు, క్లుప్తంగా చూడటానికి ఇది ఉపయోగపడుతుంది.

Bash
git log --oneline

B. పరిమిత సంఖ్యలో చూడటానికి (Limiting Commits)

చివరిగా జరిగిన 3 మార్పులను మాత్రమే చూడాలంటే:

Bash
git log -n 3

C. కోడ్ మార్పులతో సహా చూడటానికి (Patch)

ఏ ఫైల్‌లో ఏ లైన్ మార్చారో (Diff) వివరంగా చూడటానికి:

Bash
git log -p

D. గ్రాఫ్ రూపంలో చూడటానికి (Visualizing Branches)

ప్రాజెక్ట్‌లో వేర్వేరు బ్రాంచ్‌లు ఎలా విడిపోయాయో, ఎలా కలిసాయో బొమ్మలా చూడటానికి:

Bash
git log --oneline --graph --all

3. ఫిల్టర్ చేయడం (Filtering the History)

మీకు కావలసిన నిర్దిష్ట వివరాల కోసం ఇలా సెర్చ్ చేయవచ్చు:

అవసరంకమాండ్
ఒక వ్యక్తి చేసినవిgit log --author="John"
నిర్దిష్ట కాలానికి చెందినవిgit log --since="2 weeks ago"
మెసేజ్ ఆధారంగాgit log --grep="fix bug"
ఒక ఫైల్‌కు సంబంధించినవిgit log -- index.html

ముఖ్య గమనిక:

  • git log రిజల్ట్స్ ఎక్కువగా ఉన్నప్పుడు టెర్మినల్ నుండి బయటకు రావడానికి కీబోర్డులో q బటన్‌ను ప్రెస్ చేయండి.

  • పైకి, క్రిందకు స్క్రోల్ చేయడానికి Arrow Keys ఉపయోగించండి.

What is " Command and control center " in Cyber Security

 In cybersecurity, a Command and Control (C2) center—often referred to as a C2 server or C&C—is the centralized computer or infrastructure used by an attacker to remotely manage, control, and send instructions to devices compromised by malware.

Think of it as the "Brain" or "Headquarters" of a cyberattack. Without a C2 center, a piece of malware is just a silent passenger on a computer; with it, the malware becomes a remote-controlled tool capable of stealing data, spreading to other machines, or launching massive attacks.


How a Command and Control Center Works

The lifecycle of a C2 operation typically follows these four stages:

  1. Infection: A device is compromised via phishing, a software vulnerability (like a zero-day), or a malicious download.

  2. The "Callback" (Beaconing): Once the malware is active, it "phones home" to the C2 server. It sends a signal (a beacon) to tell the attacker, "I'm online and ready for orders."

  3. Command Execution: The attacker sends specific instructions through the C2 interface. This could be "Search for passwords," "Download this ransomware," or "Wait for further notice."

  4. Action & Exfiltration: The infected device executes the command. If the goal is data theft, the device sends sensitive files back to the C2 server (Data Exfiltration).


Different Architectures of C2

Attackers use different structures to keep their C2 centers from being discovered or shut down:

TypeDescriptionPros/Cons for Attacker
CentralizedA single server (or a small cluster) communicates with all infected bots directly.Pros: Easy to manage. Cons: If defenders block that one IP, the whole attack stops.
Peer-to-Peer (P2P)Infected machines talk to each other. Instructions pass from one "zombie" to the next.Pros: Very hard to shut down; no single "brain" to kill. Cons: Harder to coordinate.
Cloud/Legitimate ServicesAttackers hide commands inside services like Discord, GitHub, Dropbox, or Google Drive.Pros: Traffic looks legitimate; firewalls rarely block these sites. Cons: Service providers can ban the accounts.

Real-World Examples

1. The Mirai Botnet (IoT Takeover)

In 2016, the Mirai malware infected hundreds of thousands of "smart" devices (cameras, routers, etc.). The C2 center coordinated all these devices to send a massive flood of traffic at once (a DDoS attack), which took down major websites like Twitter, Netflix, and Reddit for several hours.

2. Cobalt Strike (The Pro Tool)

Originally a legitimate tool for "Red Teams" (ethical hackers), Cobalt Strike is now frequently stolen and used by criminals. Its C2 feature, called Beacon, allows attackers to stay hidden inside a network for months, moving from one computer to another until they find the "crown jewels" (like the company's financial records).

3. Emotet (The Malware Distributor)

Emotet was one of the most dangerous botnets in history. Its C2 infrastructure was modular; the primary C2 would tell the infected computer to download other malware, such as banking trojans or ransomware (like Ryuk). It operated as a "Malware-as-a-Service" where other criminals paid to use Emotet’s C2 infrastructure.

4. APT29 (Cozy Bear) & Cloud-Based C2

This advanced threat group (linked to Russian intelligence) is known for using legitimate web services for C2. In recent campaigns, they have used Google Drive and Microsoft OneDrive to store their commands and receive stolen data. Because most companies use these services for work, the malicious traffic blends in perfectly with normal daily activity.

5. Scattered Spider (2024-2025)

This group recently used social engineering to gain entry into major corporations. Once inside, they established C2 channels using legitimate remote access tools (like AnyDesk or ScreenConnect) to maintain a persistent "backdoor" into the network, making it look like an IT admin was just doing their job.


How Defenders Stop C2 Attacks

Since C2 communication relies on "outgoing" traffic (from your computer to the attacker), security teams focus on:

  • DNS Filtering: Blocking requests to known malicious domains.

  • Behavioral Analysis: Using AI to spot "heartbeat" patterns (regularly timed beacons) that don't look like human activity.

  • Egress Filtering: Restricting which ports and protocols a computer can use to talk to the internet.


సైబర్‌ సెక్యూరిటీలో "కమాండ్ అండ్ కంట్రోల్" (Command and Control - C2) అనేది ఒక అత్యంత కీలకమైన మరియు ప్రమాదకరమైన అంశం. దీని గురించి వివరంగా కింద తెలుసుకుందాం.


కమాండ్ అండ్ కంట్రోల్ (C2) అంటే ఏమిటి?

సైబర్‌ సెక్యూరిటీ భాషలో, కమాండ్ అండ్ కంట్రోల్ సెంటర్ అంటే హ్యాకర్లు తాము హ్యాక్ చేసిన కంప్యూటర్లను లేదా పరికరాలను రిమోట్‌గా నియంత్రించడానికి ఉపయోగించే ఒక కేంద్ర సర్వర్ లేదా కంప్యూటర్ వ్యవస్థ.

దీనిని సైబర్ దాడికి "మెదడు" (Brain) లేదా "ప్రధాన కార్యాలయం" (Headquarters) అని పిలవవచ్చు. ఒక్కసారి మాల్వేర్ (Malware) మీ కంప్యూటర్‌లోకి ప్రవేశించిన తర్వాత, అది ఈ C2 సర్వర్ నుండి వచ్చే ఆదేశాల ప్రకారం పనిచేస్తుంది.


C2 ఎలా పనిచేస్తుంది? (దశలు)

ఒక హ్యాకర్ మీ సిస్టమ్‌ను నియంత్రించడానికి సాధారణంగా ఈ క్రింది పద్ధతులను పాటిస్తారు:

  1. ఇన్‌ఫెక్షన్ (Infection): ముందుగా ఫిషింగ్ ఈమెయిల్స్ లేదా సాఫ్ట్‌వేర్ లోపాల ద్వారా బాధితుడి కంప్యూటర్‌లోకి మాల్వేర్‌ను పంపిస్తారు.

  2. బీకనింగ్ (Beaconing/Callback): మాల్వేర్ ఇన్‌స్టాల్ అయిన తర్వాత, అది హ్యాకర్ యొక్క C2 సర్వర్‌కు ఒక సిగ్నల్ పంపిస్తుంది. అంటే "నేను సిద్ధంగా ఉన్నాను, నాకేం పని చెప్పాలి?" అని అడుగుతుంది.

  3. ఆదేశాలు స్వీకరించడం (Receiving Commands): హ్యాకర్ తన C2 ఇంటర్‌ఫేస్ ద్వారా "డేటాను దొంగిలించు", "పాస్‌వర్డ్‌లు వెతుకు" లేదా "సిస్టమ్‌ను లాక్ చేయి" వంటి ఆదేశాలు పంపిస్తాడు.

  4. డేటా ఎక్స్‌ఫిల్ట్రేషన్ (Exfiltration): ఆదేశాల ప్రకారం మాల్వేర్ మీ వ్యక్తిగత సమాచారాన్ని దొంగిలించి తిరిగి C2 సర్వర్‌కు పంపిస్తుంది.


C2 ఆర్కిటెక్చర్ రకాలు

హ్యాకర్లు పట్టుబడకుండా ఉండటానికి వివిధ రకాల C2 వ్యవస్థలను ఉపయోగిస్తారు:

రకంవివరణ
కేంద్రీకృత (Centralized)ఒకే ఒక సర్వర్ ద్వారా అన్ని హ్యాక్ అయిన కంప్యూటర్లకు ఆదేశాలు వెళ్తాయి. దీనిని కనిపెట్టడం సులభం.
పీర్-టు-పీర్ (P2P)హ్యాక్ అయిన కంప్యూటర్లే ఒకదానికొకటి ఆదేశాలు ఇచ్చుకుంటాయి. దీనిని ఆపడం చాలా కష్టం.
క్లౌడ్ ఆధారిత (Cloud-based)గూగుల్ డ్రైవ్, డిస్కార్డ్ లేదా గిట్‌హబ్ వంటి ప్రసిద్ధ వెబ్‌సైట్ల వెనుక దాక్కుని ఆదేశాలు పంపిస్తారు.

నిజ జీవిత ఉదాహరణలు

1. మిరాయ్ బాట్‌నెట్ (Mirai Botnet)

2016లో మిరాయ్ అనే మాల్వేర్ లక్షలాది CCTV కెమెరాలు మరియు రూటర్లను హ్యాక్ చేసింది. హ్యాకర్లు తమ C2 సెంటర్ ద్వారా ఈ కెమెరాలన్నింటినీ ఒకేసారి ఉపయోగించి DDoS దాడి చేశారు. దీనివల్ల ట్విట్టర్, నెట్‌ఫ్లిక్స్ వంటి పెద్ద వెబ్‌సైట్లు గంటల తరబడి పనిచేయకుండా పోయాయి.

2. ఎమోటెట్ (Emotet)

ఇది ఒకప్పుడు ప్రపంచంలోనే అత్యంత ప్రమాదకరమైన బాట్‌నెట్. దీని C2 నెట్‌వర్క్ చాలా పెద్దది. హ్యాకర్లు ఒకరి కంప్యూటర్‌ను హ్యాక్ చేసి, C2 ద్వారా దానికి ఆదేశాలు ఇచ్చి, దాని ద్వారా ఇతరులకు బ్యాంకింగ్ వైరస్‌లను పంపేవారు.

3. కోబాల్ట్ స్ట్రైక్ (Cobalt Strike)

ఇది నిజానికి కంపెనీల భద్రతను పరీక్షించడానికి వాడే సాధనం. కానీ హ్యాకర్లు దీనిని దొంగిలించి, C2 సర్వర్‌గా వాడుతున్నారు. దీని ద్వారా కంపెనీల నెట్‌వర్క్‌లో నెలల తరబడి ఎవరికీ తెలియకుండా దాక్కుని డేటాను దొంగిలిస్తారు.


C2 దాడుల నుండి రక్షణ ఎలా?

  • DNS ఫిల్టరింగ్: ప్రమాదకరమైన వెబ్‌సైట్లకు లేదా డొమైన్‌లకు కనెక్ట్ అవ్వకుండా బ్లాక్ చేయడం.

  • బిహేవియరల్ అనాలిసిస్: కంప్యూటర్లు అసాధారణ రీతిలో బయటి సర్వర్‌లతో మాట్లాడుతున్నాయేమో నిరంతరం గమనించడం.

  • ఫైర్‌వాల్స్ (Firewalls): అనవసరమైన అవుట్‌గోయింగ్ ట్రాఫిక్‌ను నియంత్రించడం.

What is " Code injection " in Cyber Security

 Code injection is a high-severity security vulnerability where an application fails to distinguish between user-supplied data and its own programmatic code. This allows an attacker to "inject" malicious instructions into a web application, which the server then executes as if they were legitimate commands.

At its core, code injection occurs because the application trusts the user too much. It takes input from a form, URL, or header and passes it directly to an interpreter (like a Python engine, a SQL database, or a System Shell) without proper cleaning.


How Code Injection Works

The lifecycle of a code injection attack generally follows these steps:

  1. Discovery: An attacker finds an input field (like a login box or a search bar) that doesn't properly filter special characters (e.g., ;, ', ()).

  2. Payload Crafting: The attacker creates a "payload"—a string of text that looks like data but contains hidden code.

  3. Execution: The application takes this payload and combines it with its own internal code.

  4. Compromise: The interpreter executes the malicious part of the string, giving the attacker access to data, the server, or the ability to run system-level commands.


Common Types & Examples

1. SQL Injection (SQLi)

The most common type, targeting the application's database. The attacker "breaks out" of a data field to run their own database queries.

  • Vulnerable Code (Pseudo): query = "SELECT * FROM users WHERE username = '" + user_input + "';"

  • The Attack: An attacker enters ' OR '1'='1 in the username field.

  • The Resulting Query: SELECT * FROM users WHERE username = '' OR '1'='1';

  • Impact: Since '1'='1' is always true, the database returns every user record, effectively bypassing login security.

2. OS Command Injection

This happens when an application passes user input to the operating system's shell (like Windows Command Prompt or Linux Terminal).

  • Vulnerable Scenario: A website has a tool that lets you "ping" an IP address to check if it's online.

  • The Attack: Instead of just an IP, the attacker enters: 8.8.8.8; cat /etc/passwd

  • The Result: The server pings Google (8.8.8.8) and then immediately executes cat /etc/passwd, displaying the server's private user list to the attacker.

3. Remote Code Execution (RCE) / Eval Injection

This occurs when an application uses a "dynamic evaluation" function (like eval() in Python, JavaScript, or PHP) on user input. This is considered the "purest" form of code injection.

  • Vulnerable PHP Code: eval("echo " . $_GET['name'] . ";");

  • The Attack: The attacker visits: website.com/greet.php?name=;system('rm -rf /')

  • Impact: The server executes the system('rm -rf /') command, which attempts to delete all files on the server's hard drive.

4. Server-Side Template Injection (SSTI)

Modern websites use "template engines" (like Jinja2 or Twig) to generate HTML. If an attacker can inject template syntax, they can often gain full control of the server.

  • The Attack: An attacker enters ${7*7} into a profile name field.

  • The Result: If the page displays "49" instead of "${7*7}", the attacker knows the server is executing their input. They can then escalate this to read configuration files or environment variables.


Code Injection vs. Command Injection

While often used interchangeably, there is a technical distinction:

FeatureCode InjectionCommand Injection
TargetThe application's own language (PHP, Python, etc.)The Host Operating System (Linux, Windows)
LimitationLimited by what the programming language can do.Limited by the privileges of the system user.
ExampleInjecting a phpinfo() function into PHP code.Injecting dir or ls into a system shell.

How to Prevent Code Injection

To stop these attacks, developers must follow the rule of "Never Trust User Input."

  • Input Validation: Use "allow-lists" to ensure input matches expected patterns (e.g., a zip code must only be 5 numbers).

  • Parameterized Queries (Prepared Statements): For SQL, this is the gold standard. It sends the query structure and the data separately, so the database never "mixes" them.

  • Escaping/Encoding: Convert special characters into safe versions (e.g., turning < into &lt;) so the browser or server treats them as plain text.

  • Principle of Least Privilege: Run the application with the lowest possible permissions so that even if an injection occurs, the attacker can't access sensitive system files.

  • Avoid Dangerous Functions: Disable or strictly avoid functions like eval(), exec(), and system() whenever possible.



సైబర్ సెక్యూరిటీలో కోడ్ ఇంజెక్షన్ (Code Injection) అనేది అత్యంత ప్రమాదకరమైన సాఫ్ట్‌వేర్ లోపం. దీని గురించి పూర్తి వివరాలు ఇక్కడ ఉన్నాయి:


కోడ్ ఇంజెక్షన్ అంటే ఏమిటి?

ఒక అప్లికేషన్ (వెబ్‌సైట్ లేదా సాఫ్ట్‌వేర్), యూజర్ ఇచ్చే డేటాను (Input) మరియు తను రన్ చేయాల్సిన ప్రోగ్రామ్ కోడ్‌ను సరిగ్గా వేరు చేయలేనప్పుడు ఈ దాడి జరుగుతుంది. హ్యాకర్లు తమకు కావలసిన హానికరమైన కోడ్‌ను ఇన్పుట్ ఫీల్డ్స్ (ఉదాహరణకు: లాగిన్ బాక్స్, సెర్చ్ బార్) ద్వారా పంపిస్తారు. ఆ అప్లికేషన్ ఆ కోడ్‌ను పొరపాటున తన స్వంత కోడ్‌గా భావించి రన్ చేస్తుంది.

దీనివల్ల హ్యాకర్లు సర్వర్‌లోని డేటాను దొంగిలించవచ్చు, ఫైళ్లను డిలీట్ చేయవచ్చు లేదా పూర్తి సర్వర్‌ను తమ ఆధీనంలోకి తీసుకోవచ్చు.


కోడ్ ఇంజెక్షన్ రకాలు మరియు ఉదాహరణలు

1. SQL ఇంజెక్షన్ (SQL Injection - SQLi)

ఇది డేటాబేస్‌ను లక్ష్యంగా చేసుకుని చేసే దాడి. హ్యాకర్లు డేటాబేస్ క్వెరీలను మార్చివేస్తారు.

  • సాధారణ కోడ్: SELECT * FROM users WHERE username = 'user_input';

  • హ్యాకర్ ఇచ్చే ఇన్పుట్: ' OR '1'='1

  • ఏం జరుగుతుంది?: క్వెరీ ఇలా మారుతుంది: SELECT * FROM users WHERE username = '' OR '1'='1';

  • ఫలితం: '1'='1' అనేది ఎప్పుడూ నిజం (True) కాబట్టి, పాస్‌వర్డ్ తెలియకపోయినా హ్యాకర్ సిస్టమ్‌లోకి లాగిన్ అయిపోతాడు.

2. OS కమాండ్ ఇంజెక్షన్ (OS Command Injection)

వెబ్ అప్లికేషన్ ద్వారా ఆపరేటింగ్ సిస్టమ్ (Windows/Linux) యొక్క కమాండ్లను రన్ చేయడం.

  • ఉదాహరణ: ఒక వెబ్‌సైట్ మీ IP అడ్రస్‌ను 'Ping' చేయడానికి అనుమతిస్తుంది అనుకుందాం.

  • హ్యాకర్ ఇన్పుట్: 8.8.8.8; cat /etc/passwd

  • ఫలితం: సర్వర్ మొదట పింగ్ చేస్తుంది, ఆ తర్వాత వెంటనే సెమికోలన్ (;) తర్వాత ఉన్న రెండో కమాండ్‌ను రన్ చేసి సర్వర్‌లోని యూజర్ల వివరాలన్నింటినీ హ్యాకర్‌కు చూపిస్తుంది.

3. రిమోట్ కోడ్ ఎగ్జిక్యూషన్ (Remote Code Execution - RCE)

ప్రోగ్రామింగ్ లాంగ్వేజ్‌లలో ఉండే eval() వంటి ఫంక్షన్లను ఉపయోగించి హ్యాకర్లు సర్వర్‌పై నేరుగా కోడ్‌ను రన్ చేస్తారు.

  • ఉదాహరణ: ఒక PHP వెబ్‌సైట్‌లో హ్యాకర్ URL ద్వారా హానికరమైన స్క్రిప్ట్‌ను పంపి సర్వర్‌లోని ఫైళ్లను డిలీట్ చేయవచ్చు.


కోడ్ ఇంజెక్షన్ vs కమాండ్ ఇంజెక్షన్

ఫీచర్కోడ్ ఇంజెక్షన్కమాండ్ ఇంజెక్షన్
లక్ష్యంప్రోగ్రామింగ్ లాంగ్వేజ్ (PHP, Python, etc.)ఆపరేటింగ్ సిస్టమ్ (Linux, Windows)
పరిధిప్రోగ్రామ్ చేసే పనులకు పరిమితం.సర్వర్ లోని ఫైల్ సిస్టమ్ మొత్తానికి యాక్సెస్ ఉండవచ్చు.
ఉదాహరణకొత్త ఫంక్షన్‌ను ఇంజెక్ట్ చేయడం.ls, dir, rm వంటి కమాండ్లను రన్ చేయడం.

కోడ్ ఇంజెక్షన్‌ను ఎలా నిడొవాలి? (Prevention)

డెవలపర్లు ఈ క్రింది జాగ్రత్తలు తీసుకోవడం ద్వారా ఇటువంటి దాడులను అడ్డుకోవచ్చు:

  1. ఇన్పుట్ వాలిడేషన్ (Input Validation): యూజర్ ఇచ్చే డేటా కేవలం అక్షరాలు లేదా అంకెలే ఉండాలని, ప్రత్యేక గుర్తులు (Specical Characters) ఉండకూడదని నిబంధనలు పెట్టాలి.

  2. పారామీటరైజ్డ్ క్వెరీలు (Parameterized Queries): SQL ఇన్జెక్షన్‌ను ఆపడానికి ఇది ఉత్తమ మార్గం. దీనివల్ల డేటాబేస్ యూజర్ ఇచ్చే ఇన్పుట్‌ను కేవలం 'డేటా' లాగానే చూస్తుంది, 'కోడ్' లాగా కాదు.

  3. డేంజరస్ ఫంక్షన్లను వాడకపోవడం: eval(), exec(), system() వంటి ఫంక్షన్లను వాడకుండా ఉండటం మంచిది.

  4. తక్కువ అధికారాలు (Least Privilege): అప్లికేషన్‌ను రన్ చేసేటప్పుడు దానికి అవసరమైన దానికంటే ఎక్కువ పర్మిషన్లు ఇవ్వకూడదు.


ముగింపు: "యూజర్ ఇచ్చే ఏ డేటా కూడా సురక్షితం కాదు" అనే సూత్రాన్ని పాటిస్తే ఇలాంటి దాడుల నుండి అప్లికేషన్లను కాపాడుకోవచ్చు.