<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shibly Sadik on Medium]]></title>
        <description><![CDATA[Stories by Shibly Sadik on Medium]]></description>
        <link>https://medium.com/@shiblysadik?source=rss-79235f7f39d1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oS5t65KfTJJiaqSi7wSMVw.jpeg</url>
            <title>Stories by Shibly Sadik on Medium</title>
            <link>https://medium.com/@shiblysadik?source=rss-79235f7f39d1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 22 May 2026 13:50:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shiblysadik/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Threat Hunt simulation and Report Generation]]></title>
            <link>https://medium.com/@shiblysadik/threat-hunt-simulation-and-report-generation-15591bc84fe7?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/15591bc84fe7</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[report-writing]]></category>
            <category><![CDATA[soc-analyst]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[log-analysis]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Fri, 01 Aug 2025 21:23:15 GMT</pubDate>
            <atom:updated>2025-08-01T21:23:15.109Z</atom:updated>
            <content:encoded><![CDATA[<p>This case study guides the analyst through a complete end-to-end threat hunting simulation using real-world logs and adversary behavior. The goal is to perform a structured hunt, identify malicious activity, and write a professional report containing findings, indicators, and recommendations.</p><p>The scenario is based on a post-compromise activity involving initial access via phishing, followed by lateral movement and data exfiltration using cloud services.</p><p><strong>Phase 1 — Scenario Setup</strong><br> Background<br>A user in the Sales department reports unusual slowness and pop-ups.<br>The security team suspects the machine may have been compromised.<br>You are provided with logs from:<br> 1.Sysmon (Windows event logging)<br>2.EDR (CrowdStrike)<br>3.Proxy logs (Zscaler format)<br>4.DNS logs<br>5.Authentication logs (AD)</p><p><strong>Your mission is to:</strong></p><p><strong>Identify the initial infection vector.<br>Map the attacker behavior using MITRE ATT&amp;CK.<br>Correlate indicators across log sources.<br>Recommend remediation steps.</strong></p><h4>Phase 2 — Hypothesis and TTP Mapping</h4><p>Hypothesis: A phishing email led to malware execution on a workstation. The malware established persistence, then moved laterally via RDP and exfiltrated data via Dropbox.</p><p>Relevant MITRE Techniques:</p><p>T1566.001 — Phishing: Spearphishing Attachment<br>T1059 — Command and Scripting Interpreter<br>T1021.001 — Remote Desktop Protocol<br>T1041 — Exfiltration Over Web Service</p><h4>Phase 3 — Threat Hunting Process</h4><p><strong>1. Identify Initial Execution</strong><br>Sysmon Query (SPL or KQL):</p><p>index=sysmon EventCode=1<br>CommandLine=”powershell*” OR CommandLine=”cmd*”<br>| where CommandLine like “%-EncodedCommand%”<br>| stats count by host, CommandLine, ParentProcessName, _time</p><p><strong>Finding:</strong><br>A user opened a document from their desktop. It spawned winword.exe, which then launched PowerShell with an encoded payload.</p><p><strong>2. Detect Persistence</strong><br>Sysmon EventCode=13 (Registry Modification):</p><pre>index=sysmon EventCode=13<br>TargetObject=&quot;HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\*&quot;</pre><p><strong>Finding:</strong><br>The payload added itself to the Run key for persistence.</p><p><strong>3. Lateral Movement via RDP<br></strong>Windows Security Log — Event ID 4624:</p><pre>index=wineventlog EventCode=4624 LogonType=10<br>| stats count by TargetUserName, SourceNetworkAddress, WorkstationName</pre><p><strong>Finding:</strong><br>RDP sessions initiated from the infected host to multiple internal servers using cached credentials.</p><p><strong>4. Exfiltration Detection (Proxy Logs)</strong><br>Zscaler Format Sample:</p><pre>&quot;timestamp&quot;,&quot;user&quot;,&quot;url&quot;,&quot;app_class&quot;,&quot;action&quot;,&quot;dstip&quot;<br>&quot;2024–06–22T12:45:02Z&quot;,&quot;jdoe&quot;,&quot;https://dl.dropboxusercontent.com/data.zip&quot;,&quot;Web-based file sharing&quot;,&quot;ALLOW&quot;,&quot;162.125.32.5&quot;</pre><p><strong>Query:</strong></p><pre>SELECT * FROM proxy_logs<br>WHERE url LIKE &#39;%dropbox%&#39; OR app_class=&#39;Web-based file sharing&#39;</pre><p><strong>Finding:</strong><br>Large volume of outbound HTTPS requests to Dropbox during non-working hours.</p><p><strong>5. Enrich With Threat Intelligence</strong></p><p><strong>Lookup IOC:</strong></p><p>The PowerShell C2 IP was found in ThreatFox and VirusTotal as linked to AsyncRAT campaigns.</p><p><strong>Phase 4 — Report Writing</strong><br>Report Template<br>Title: Threat Hunting Report — Phishing to Exfiltration via Dropbox<br>Date: 2025–06–30<br>Author: [Your Name]<br>Scope: Workstation COMP-011 / User jdoe<br>Tools Used: Splunk, MISP, KQL, Sysmon, Proxy Logs, EDR Console</p><p><strong>Findings Summary</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*Qgg9nQXD_sH52LU7fHXVQQ.png" /></figure><p><strong>MITRE ATT&amp;CK Mapping</strong></p><p>T1059.001 — PowerShell Execution<br>T1547.001 — Registry Run Key Persistence<br>T1021.001 — RDP Movement<br>T1041 — Exfiltration via Web Service</p><p><strong>Recommendations</strong></p><p>1. Isolate host COMP-011 and reset credentials<br>2.Block outbound connections to dropboxusercontent.com<br>3.Deploy EDR remediation playbooks for all lateral targets<br>4.Strengthen email gateway to detect macro documents<br>5.Hunt for similar IOC patterns across the fleet</p><p><strong>Deliverables<br></strong>.pdf Report<br>.ioc file with all extracted indicators<br>.csv of all log events matching threat behavior<br>Sigma rule for detection of this behavior chain</p><p><strong>Summary</strong><br>This simulation demonstrates how structured threat hunting using correlated logs, threat intel, and detection engineering can surface advanced threats that evade traditional alerting. Real-world Blue Teams should maintain playbooks, enrichments, and hunting dashboards to repeat this process quickly in live environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15591bc84fe7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FCF-Fortinet Cyber Security Fundamentals 3.0]]></title>
            <link>https://medium.com/@shiblysadik/fcf-fortinet-cyber-security-fundamentals-3-0-c006df27f3fc?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c006df27f3fc</guid>
            <category><![CDATA[blue-teaming]]></category>
            <category><![CDATA[fortinet]]></category>
            <category><![CDATA[defensive-security]]></category>
            <category><![CDATA[soc-analyst]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Sun, 27 Jul 2025 19:37:42 GMT</pubDate>
            <atom:updated>2025-07-27T19:37:42.497Z</atom:updated>
            <content:encoded><![CDATA[<h3>Firewalls</h3><h4>Learning Objective:</h4><p>1.Define firewalls and their evolution</p><p>2.Describe how firewalls work</p><p>3.Explain the latest firewall status.</p><h4>The Evolution of Firewalls:</h4><ol><li>Packet filter/stateless firewall</li><li>stateful firewall</li><li>Third-generation firewall</li><li>Next-genaration firewall (NGFW)</li></ol><h4>How firewall Work:</h4><p>First-Generation firewall —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*6vEwANHqy6Fd6mynH2Nwvw.png" /></figure><p>Second Generation firewall —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IsvXeVtlQENh96BJqc2NvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*219ILe9JlpzO7koP75ut2g.png" /></figure><p>Third Genaration Firewalls —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*XukYheglCcy5co3inm1kHA.png" /></figure><p>The latest firewall traffic —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*PtQ2xOS1yCj7NTzHrEOkCw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*zq8ksP4Q1We77cHd_W-BYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*ZVLaorX_3v4k6df-wsPZ4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*Yj20tC4KvBOw0g_F7meGvQ.png" /></figure><h3>Network Access Control:</h3><p>Network access control (NAC), also known as network admission control, is the process of restricting unauthorized users and devices from gaining access to a corporate or private network. NAC ensures that only users who are authenticated and devices that are authorized and compliant with security policies can enter the network.</p><p>s endpoints proliferate across an organization — typically driven by <a href="https://www.fortinet.com/resources/cyberglossary/byod">bring-your-own-device (BYOD)</a> policies and an expansion in the use of Internet-of-Things (IoT) devices — more control is needed. Even the largest IT organizations do not have the resources to manually configure all the devices in use. The automated features of a NAC solution are a sizable benefit, reducing the time and associated costs with authenticating and authorizing users and determining that their devices are compliant.</p><p>Further, cyber criminals are well aware of this increase in endpoint usage and continue to design and launch sophisticated campaigns that exploit any vulnerabilities in corporate networks. With more endpoints, the attack surface increases, which means more opportunities for fraudsters to gain access. NAC solutions can be configured to detect any unusual or suspicious network activity and respond with immediate action, such as isolating the device from the network to prevent the potential spread of the attack.</p><p>Although <a href="https://www.fortinet.com/content/dam/fortinet/assets/white-papers/wp-evolution-of-network-access-control.pdf">IoT and BYOD have changed NAC solutions</a>, NAC also serves as a perpetual inventory of users, devices, and their level of access. It serves as an active discovery tool to uncover previously unknown devices that may have gained access to all or parts of the network, requiring IT administrators to adjust security policies.</p><p>Further, organizations can choose how NAC will authenticate users who attempt to gain access to the network. IT admins can choose multi-factor authentication (MFA), which provides an additional layer of security to username and password combinations.</p><p>Restricting network access also means control of the applications and data within the network, which is normally the target of cyber criminals. The stronger the network controls, the more difficult it will be for any cyberattack to infiltrate the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*N2UuDlokURYDWL_TFaScpw.png" /></figure><h3>What Are The Advantages of Network Access Control?</h3><p>Network access control comes with a number of benefits for organizations:</p><ol><li>Control the users entering the corporate network</li><li>Control access to the applications and resources users aim to access</li><li>Allow contractors, partners, and guests to enter the network as needed but restrict their access</li><li>Segment employees into groups based on their job function and build role-based access policies</li><li>Protect against cyberattacks by putting in place systems and controls that detect unusual or suspicious activity</li><li>Automate <a href="https://www.fortinet.com/resources/cyberglossary/incident-response">incident response</a></li><li>Generate reports and insights on attempted access across the organization</li></ol><h4>Current NAC Capabilities:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*9OqXYSFYOnQhztKUuzse9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*4qJye0o62fzTSAmvDg3xag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*z2p6oC7KsTh9JFGl4AfLWw.png" /></figure><p>Sandbox:</p><p>A sandbox in computer security is an isolated environment used to safely execute and test untrusted programs, code, or files without risking harm to the host system or network. It acts as a containment area where potentially malicious activities can be observed and analyzed without affecting the broader system. This approach is particularly useful for identifying and mitigating threats such as malware, zero-day exploits, and other cyber risks.</p><p>Sandboxing is often implemented through virtualization, where a restricted environment mimics the target system’s operating environment, allowing security professionals to analyze the behavior of suspicious files or applications. For example, security researchers use sandboxes to examine malware by running it in a controlled setting, observing its actions, and determining its potential impact on the system. This method is also widely used by developers to test new code before deploying it to production environments.</p><p>There are various types of sandboxing, including application sandboxing, web browser sandboxing, and network sandboxing, each designed to isolate specific components of a system for enhanced security. Additionally, sandboxes can be implemented at the operating system level, such as in Android, where each application runs in its own sandboxed environment, or in Windows with features like Windows Sandbox. These mechanisms help prevent unauthorized access to sensitive data and limit the spread of vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*AuI6rDQF9z5nYqlaBKHPiQ.png" /></figure><h4>WAF(Web Application Firewall):</h4><p>A ‘’’web application firewall (WAF)’’’ is an <a href="https://en.wikipedia.org/wiki/Web_application_firewall">application firewall</a> for HTTP applications. It applies a set of rules to an HTTP conversation. Generally, these rules cover common attacks such as <a href="https://owasp.org/www-community/attacks/xss">Cross-site Scripting (XSS)</a> and <a href="https://owasp.org/www-community/attacks/SQL_Injection">SQL Injection</a>,File Inclusion,security misconfiguration.</p><p>While proxies generally protect clients, WAFs protect servers. A WAF is deployed to protect a specific web application or set of web applications. A WAF can be considered a <a href="https://en.wikipedia.org/wiki/Reverse_proxy">reverse proxy</a>.</p><p>WAFs may come in the form of an appliance, server plugin, or filter, and may be customized to an application. The effort to perform this customization can be significant and needs to be maintained as the application is modified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*WQwzXol_oPeDSYChoVTLVA.png" /></figure><h4>Fortiweb:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*S0fwFi3fJgfETiCd9aneCw.png" /></figure><p>Secure Email Gateway:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*Qi1_Zz5N9zzkWz96vjz7qQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*70sdBIulzfZQfI2LX9-Rug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*9X_IxGCSqSIpubeJaSCvBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*VJxnngH_rbQfBG0rfjIZvw.png" /></figure><p>Content Filterring:</p><p>Content filtering is the screening of content to restrict or block websites. This could include material that compromises security or breaches internal content consumption policies.</p><p>Content filters <a href="https://nordlayer.com/blog/how-to-block-websites-in-a-workplace/">manage employee access to websites</a>, emails, or mobile communications. Almost all organizations have some form of filtering system. But filtering varies in form and scope, and many options are available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*zAoDNnWfL3VIxO-3KljmCQ.png" /></figure><h3>Secure Wi-Fi</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*6AHDhFOA6qFawG8Vt7Z6Jg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*GsW2YB0KsmVZM24FzOKy9g.png" /></figure><h3><strong>Endpoint Hardening Techniques:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*H_Ev5PQl2FxXwdMmkHp0GQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*Zhbor0kZmHPonpdEM_Qv4Q.png" /><figcaption>Local endpoint protection techniques encompass a variety of methods and tools aimed at securing individual devices (endpoints) like laptops, desktops, and mobile devices from cyber threats. Here is a comprehensive overview of key local endpoint protection techniques:</figcaption></figure><p><strong>Endpoint Protection Platforms (EPP)</strong><br> These are suites of security tools installed locally on each device. EPP includes traditional antivirus, anti-malware, data encryption, intrusion prevention, and data loss prevention (DLP). They work to <strong>prevent</strong> attacks by detecting and blocking known threats on the endpoint. EPP tools often provide centralized management for easier administration across many devices18.</p><p><strong>Endpoint Detection and Response (EDR)</strong><br> EDR complements EPP by continuously monitoring endpoint behavior. It detects suspicious or malicious activities, provides context for investigations, and enables rapid incident response. EDR records endpoint activity in real-time, helping to uncover hidden threats that bypass preventive measures16.</p><p><strong>Antivirus and Anti-Malware Software</strong><br> Core tools that scan for known malicious code signatures and behaviors. They should be kept up-to-date with the latest threat definitions and may include real-time protection to block threats as they arise257.</p><p><strong>Patch Management</strong><br> Regularly updating the operating system and installed software closes vulnerabilities that attackers exploit. Automated patch management tools help maintain endpoint security hygiene by applying patches promptly25.</p><p><strong>Least Privilege Access Control</strong><br> Limiting user permissions to only the minimum necessary reduces the risk that attackers can escalate privileges if they compromise an endpoint. Removing local administrator rights is a vital preventive tactic in this category125.</p><p><strong>Application Control</strong><br> Tools like Windows Defender Application Control (WDAC) and AppLocker restrict which applications and scripts can run on endpoint blocking unauthorized or potentially malicious software execution2.</p><p><strong>Attack Surface Reduction and System Hardening</strong><br> Techniques to reduce the attack vectors include:</p><p>Disabling unnecessary services and features</p><p>Restricting file types, especially scripting files</p><p>Enabling secure boot to ensure only trusted software loads at startup</p><p>Applying firewall rules to control inbound/outbound traffic</p><p>Using virtualization-based security to isolate core OS functions25</p><p><strong>Full Disk Encryption</strong><br> Encrypting the entire disk, typically using tools like BitLocker, protects data on stolen or lost devices by requiring authentication to access stored information256.</p><p><strong>User Authentication Monitoring</strong><br> Monitoring login attempts and differentiating between legitimate users and suspicious access attempts helps detect compromised accounts or insider threats1.</p><p><strong>DNS Filtering</strong><br> Blocking access to known malicious websites on the endpoint level as a preventive measure to avoid malware downloads or phishing attacks2.</p><p><strong>Privileged Access Workstations (PAW) and Privileged Access Management (PAM)</strong><br> These strategies secure and monitor administrative access tightly, often requiring use of dedicated, highly secured machines for sensitive tasks to minimize risk2.</p><p><strong>Behavioral Analysis and Machine Learning</strong><br> Advanced endpoint protection solutions employ AI to identify unusual patterns and emerging threats beyond signature-based detection, adapting to new attack techniques135.</p><p>In practice, a <strong>layered defense approach</strong> that combines several of these techniques is most effective to cover the broad spectrum of threats endpoints face. For example, combining an EPP solution with continuous EDR monitoring, proper patching, least privilege policies, and system hardening greatly enhances protection.</p><p>Modern local endpoint protection involves the integration of these techniques into cohesive platforms (like Microsoft Defender for Endpoint, Trellix Endpoint Security, and FortiEDR) that provide real-time monitoring, centralized policy enforcement, automated investigation, and remediation capabilities146.</p><p>This comprehensive collection of endpoint protection techniques addresses prevention, detection, and response — key pillars needed to secure endpoints in today’s complex threat landscape.</p><ol><li>https://www.bluevoyant.com/knowledge-center/what-is-endpoint-protection-solutions-and-best-practices</li><li>https://netcompany.com/a-guide-to-endpoint-security/</li><li>https://www.adminbyrequest.com/en/blogs/top-strategies-for-effective-endpoint-security</li><li>https://www.sentinelone.com/cybersecurity-101/endpoint-security/endpoint-protection-solutions/</li><li>https://www.adminbyrequest.com/en/blogs/mastering-endpoint-security-essential-strategies-and-solutions</li><li>https://www.fortinet.com/uk/resources/cyberglossary/types-of-endpoint-security</li><li>https://learn.microsoft.com/en-us/intune/configmgr/protect/deploy-use/endpoint-antimalware-policies</li><li>https://www.paloaltonetworks.com/cyberpedia/what-is-endpoint-protection</li><li>https://perception-point.io/guides/endpoint-security/how-to-choose-an-endpoint-protection-platform-epp/</li></ol><h3>Endpoint Monitoring:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*eBxP4oZasTTes2vti9CSwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*1oMbzGRjArHGQlq38WRSCQ.png" /></figure><h3>SOAR:Security Orchestration,automation and response</h3><p>SOAR stands for Security Orchestration, Automation, and Response. It is a technology solution designed to help security operations teams manage, automate, and coordinate their cybersecurity processes and incident response in a more efficient and standardized way.</p><h3>What Does SOAR Do?</h3><ul><li>Orchestration: Connects and integrates multiple security tools (such as firewalls, SIEM, EDR, threat intelligence), centralizing their data and allowing them to work together in concert. This gives a unified view and enables more efficient operations.</li><li>Automation: Takes over repetitive, manual security tasks (e.g., gathering alerts, scanning vulnerabilities, running queries, enriching threat data) and automates well-defined workflows. This reduces human errors, frees up analyst time, and speeds response.</li><li>Response: Coordinates, manages, and standardizes how security teams respond to incidents. SOAR includes incident response playbooks — predefined, automated sequences of actions triggered by certain types of security events.</li></ul><h3>Core Components of SOAR</h3><p>Security Orchestration-Integrates diverse security and IT tools for centralized data and workflows.</p><p>Security Automation-Automates repetitive and time-consuming activities (e.g., triage, enrichment).</p><p>Incident Response-Standardizes and automates the response, escalation, and remediation to threats.</p><p>Threat Intelligence-Aggregates and correlates real-time threat intelligence with internal data.</p><p>Playbooks-Step-by-step automated workflows for common incidents (like phishing or malware).</p><p>Case Management-Documents, tracks, and manages incidents from detection to resolution.</p><h3>How SOAR Works (Typical Workflow)</h3><ol><li>Detection: SOAR ingests alerts and logs from multiple sources.</li><li>Triage: Automatically analyzes, prioritizes, and validates alerts — reducing false positives.</li><li>Enrichment: Pulls contextual information from internal and external intelligence sources to add details to incidents.</li><li>Response: Executes automated or semi-automated playbooks (e.g., quarantining devices, blocking IPs, alerting users).</li><li>Escalation: If automation cannot fully resolve, escalates incidents to analysts with all gathered evidence.</li><li>Case Management &amp; Reporting: Documents the incident lifecycle for compliance and learning.</li></ol><h3>Why Use SOAR?</h3><ul><li>Faster Incident Response: Automates alert triage and routine security tasks — cutting response times from hours to minutes.</li><li>Consistency &amp; Standardization: Predefined playbooks ensure every incident is handled according to best practices.</li><li>Better Use of Resources: Frees up skilled analysts for higher-level investigations and strategic work.</li><li>Reduced Risk and Human Error: Automated processes limit variability and mistakes during incident response.</li><li>Centralization: Brings together data, tools, and workflows in one platform for better collaboration and visibility.</li></ul><h3>Common SOAR Use Cases</h3><ul><li>Phishing Detection &amp; Response: Automatically analyzes suspicious emails, extracts indicators, blocks malicious senders, and isolates endpoints.</li><li>Automated Vulnerability Management: Continuously scans, prioritizes, and remediates known vulnerabilities across the environment.</li><li>Threat Hunting: Correlates and analyzes logs/intelligence to spot emerging threats proactively.</li><li>Case Management: Tracks the full lifecycle of incidents for compliance and forensics.</li><li>Threat Intelligence Integration: Aggregates, correlates, and operationalizes threat data from multiple sources.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*JsFq-9Cy_rtft3nk8AxryQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*FkWCaXVt50wx6YhG6ZKivQ.png" /></figure><h3>SIEM: Security Information and Event Management</h3><p>SIEM stands for Security Information and Event Management. It is a platform or software solution that collects, aggregates, analyzes, and manages security-related data from multiple sources within an organization’s IT infrastructure, offering a comprehensive and unified view of security across the organization.</p><h3>What Does SIEM Do?</h3><ul><li>Log Collection &amp; Aggregation: SIEM collects log and event data from various sources such as operating systems, servers, applications, firewalls, endpoint devices, databases, network equipment, and cloud environments.</li><li>Normalization &amp; Correlation: The system normalizes all this disparate data into a common format, then uses powerful analytics and correlation rules to connect related events and detect suspicious activities or patterns that might indicate an attack.</li><li>Real-Time Monitoring &amp; Alerting: SIEM provides real-time security monitoring, continuously analyzing incoming data for anomalies, threats, or compliance issues. When something suspicious is detected, the system generates alerts, often with prioritization based on severity.</li><li>Incident Investigation &amp; Forensics: Security teams can investigate incidents using SIEM dashboards, which provide tools for searching, filtering, and visualizing data to understand the scope and timeline of an attack.</li><li>Automation &amp; Response (Integration with SOAR): More advanced SIEMs can feed into or integrate with Security Orchestration, Automation, and Response (SOAR) platforms to automate responses or trigger predefined playbooks.</li><li>Regulatory Compliance: SIEM helps with compliance by producing required audit trails and reports for standards like PCI DSS, HIPAA, GDPR, and more.</li></ul><h3>How SIEM Works: Main Steps</h3><ol><li>Data Collection: Deploy agents or connectors to collect log and event data from across the IT environment.</li><li>Data Aggregation &amp; Storage: All data is centralized, typically in a dedicated SIEM server or cloud-based storage for scalability and retention.</li><li>Event Correlation &amp; Analysis: Rules, machine learning, and behavioral analytics are used to identify abnormal or malicious patterns across data sources.</li><li>Alerting: High-priority alerts are generated for analysts based on defined policies and analytics results.</li><li>Investigation: Analysts use SIEM’s search and visualization tools to further investigate incidents and determine the root cause.</li><li>Reporting &amp; Compliance: Regular or ad-hoc reports can be generated for compliance, forensics, or management.</li></ol><h3>Key Benefits of SIEM</h3><ul><li>Centralized Visibility: View all security events from one place, enhancing situational awareness.</li><li>Improved Threat Detection: Discover threats that would not be apparent from isolated events.</li><li>Incident Response: Increase the speed and accuracy of response to incidents by providing rich contextual data.</li><li>Compliance Aid: Automate log management and reporting for regulatory standards.</li><li>Advanced Analytics: Use user and entity behavior analytics (UEBA), threat intelligence, and sometimes AI to detect sophisticated threats.</li></ul><h3>Modern SIEM Features</h3><ul><li>Integration with cloud and on-prem systems</li><li>User and Entity Behavior Analytics (UEBA)</li><li>SOAR (Security Orchestration, Automation, and Response) capabilities</li><li>Customizable dashboards and reports</li><li>Scalable data storage and retention for historical analysis</li></ul><h3>Example SIEM Products</h3><p>Some major commercial and open source SIEM solutions include:</p><ul><li>Splunk</li><li>IBM QRadar</li><li>Microsoft Sentinel</li><li>ArcSight</li><li>Elastic SIEM</li></ul><p>In summary, SIEM is foundational in modern cybersecurity operations, enabling organizations to detect, investigate, and respond to abnormal activities or attacks before they do significant damage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*pNI6KUXAFkd-3hFRvJyKHQ.png" /></figure><p>SIEM Compliance:</p><p>SIEM Compliance refers to the process by which an organization’s Security Information and Event Management (SIEM) system is configured and managed to meet various regulatory and industry standards related to data protection, monitoring, logging, incident response, and reporting. It ensures that the organization’s security monitoring practices comply with legal and sector-specific requirements such as GDPR, HIPAA, PCI DSS, SOX, FISMA, and others.</p><p>Key aspects of SIEM Compliance include:</p><ul><li>Monitoring and Logging: Collecting and securely storing logs and security event data from diverse IT components (servers, firewalls, endpoints, applications) in a way that meets regulatory standards for integrity and retention.</li><li>Data Masking and Protection: Configuring SIEM to mask or protect sensitive information (like Social Security Numbers or personal health data) while still allowing for effective monitoring.</li><li>Real-Time Monitoring and Incident Detection: Setting up continuous, real-time analysis to detect security incidents promptly as many regulations require timely threat detection and response.</li><li>Incident Response and Reporting: Automating the process of responding to and reporting security breaches, often within strict timelines (e.g., breach notification within 72 hours under GDPR).</li><li>Audit Trails and Compliance Reporting: Maintaining detailed logs of security events and activities to provide evidence for audits and regulatory compliance, supported by automated reporting tools.</li><li>Alignment with Multiple Regulations: Customizing SIEM configurations to align with the unique requirements of various regulations an organization must comply with, which can vary by industry and geography.</li><li>Integration and Automation: Enhancing SIEM for compliance by integrating with other security tools (like endpoint detection and vulnerability management) and automating compliance workflows to reduce human error and improve efficiency.</li></ul><p>The goal of SIEM Compliance is not just to check regulatory boxes but to strengthen overall cybersecurity posture by ensuring continuous monitoring, timely incident management, and comprehensive documentation for audits and legal scrutiny.</p><p>In practice, organizations achieve SIEM Compliance by tailoring their SIEM platforms to meet specific regulatory frameworks, automating compliance monitoring and reporting, conducting regular audits, and integrating SIEM with broader security infrastructure to maintain a holistic security and compliance strategy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*Xq3nfHv7z4-rAZcn3qx4Dg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*6jaIKmvtj_8syqU06H5KIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*hRCsuFXb3OocmJfTZOgAzw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*xD35wxxNhh_4lg8DMYUZEA.png" /></figure><h3>SD-WAN:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*WjQfjpYIRYmArzuAVBVEMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*9TfhgjwQIPHQMmZxk-wOMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*skfY48PcBDBciFtAiBzz6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*3RXWAi22Wx_OW97B7JnNjQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*_am4_r_0H-3Q3HBGfX0QOw.png" /></figure><h3>ZTNA:Zero Trust Network Access(ZTNA)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*F9Y6bb31XRP-A3LM2Vdd0Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*OfgTZL7GOZD2Qhr5I-AHNQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*OXYb9L1WQA2dnDgMEqj-yg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*_bBN_WtOjNfyTtfm44-E6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*Sfp2b7gGrNOZk7NKBQEbzA.png" /></figure><h3>Cloud Security:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*m3AI706PteB5zjk5E6S7Jg.png" /></figure><h3>SASE: Secure access service edge</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*5u_HcYkcrh_1Y3IURqhqIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*E3CCMFEIW9VM7lb-FN1XdQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*sO9Zx2Gg4o8XGc7Ge3zbeQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*P86Ou7_BG8mz6brsVl275g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*Wlrr28nRu6TKlniBW1BWWw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c006df27f3fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Suspicious Links & Their Threats]]></title>
            <link>https://medium.com/@shiblysadik/understanding-suspicious-links-their-threats-b54845a86f9e?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b54845a86f9e</guid>
            <category><![CDATA[soc]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[phishing]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Sun, 09 Mar 2025 17:50:44 GMT</pubDate>
            <atom:updated>2025-03-09T17:50:44.240Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*BoK-mTj7gapEB8iKcbm2xw.jpeg" /></figure><h3><strong>Introduction</strong></h3><h4>Overview of Cyber Threats Related to Suspicious Links</h4><p>Suspicious links are one of the most common entry points for cyberattacks. Clicking on a malicious link can lead to:<br>✔ <strong>Phishing</strong> — Stealing user credentials.</p><p>Common Types of Phishing Attacks:</p><ul><li><strong>Email Phishing:</strong> The most common type, involving fraudulent emails that appear legitimate.</li><li><strong>Spear Phishing:</strong> Targeted attacks that use personalized information about the victim to increase the likelihood of success.</li><li><strong>Whaling:</strong> Phishing attacks that target high-profile individuals within an organization.</li><li><strong>Business Email Compromise (BEC):</strong> Phishing attacks that target business email accounts to steal money or sensitive information.</li><li><strong>Smishing:</strong> Phishing attacks conducted via SMS messages.</li><li><strong>Vishing:</strong> Phishing attacks conducted via phone calls.</li><li><strong>Clone Phishing:</strong> Attackers mimic legitimate emails and modify them to include malicious links or attachments.</li></ul><p>✔ <strong>Malware Infection</strong> — Downloading viruses, ransomware, or spyware.</p><p><strong>Common Types of Malware:</strong></p><ul><li><strong>Viruses:</strong> Malware that attaches to other programs and replicates itself, potentially damaging files or systems.</li><li><strong>Worms:</strong> Self-replicating malware that spreads rapidly across networks without needing to attach to other files.</li><li><strong>Trojan Horses:</strong> Malware disguised as legitimate software, which can install other malicious programs or steal data.</li><li><strong>Spyware:</strong> Software that secretly monitors and collects information about a user&#39;s activities without their knowledge.</li><li><strong>Ransomware:</strong> Malware that encrypts a user&#39;s files and demands payment for their release.</li><li><strong>Adware:</strong> Software that displays unwanted advertisements, potentially slowing down a device and exposing users to malicious links.</li></ul><p>✔ <strong>Data Breaches</strong> — Extracting personal or financial data.</p><p>Common Causes of Data Breaches:</p><ul><li><strong>Insider Threats:</strong> Misuse of privileged access by employees or insiders.</li><li><strong>Weak Passwords:</strong> Easily guessable or stolen passwords.</li><li><strong>Unpatched Applications:</strong> Outdated software with known vulnerabilities.</li><li><strong>Malware:</strong> Malicious software that can infect systems and steal data.</li><li><strong>Social Engineering:</strong> Tricking individuals into revealing sensitive information.</li><li><strong>Physical Attacks:</strong> Physical theft or damage of devices containing data.</li></ul><p>✔ <strong>Drive-By Downloads</strong> — Exploiting browser vulnerabilities.</p><h4>Real-World Examples of Phishing &amp; Malware Attacks</h4><ol><li><strong>Google Docs Phishing Attack (2017)</strong> — Attackers used a fake Google Docs link to steal Gmail credentials.<br>2. <strong>Twitter Bitcoin Scam (2020)</strong> — Hackers compromised high-profile accounts to post scam links.<br>3.<strong>WannaCry Ransomware (2017)</strong> — Spread via malicious links and infected over 200,000 devices.</li></ol><h3>Identifying Suspicious Links</h3><h3>Common Signs of a Malicious Link</h3><p>🔹 <strong>Shortened URLs</strong> (e.g., bit.ly, tinyurl.com) — Can hide the actual destination.<br>🔹 <strong>Misspellings &amp; Homoglyphs</strong> — e.g., g00gle.com instead of google.com.<br>🔹 <strong>Unexpected Domains</strong> – Fake subdomains like paypal.secure-login.com.<br>🔹 <strong>HTTP vs. HTTPS</strong> – Secure sites should use <a href="https://.">https://.</a></p><h3>Tools to Check Link Safety</h3><p><strong>VirusTotal</strong> — <a href="https://www.virustotal.com">www.virustotal.com</a><br> <strong>URLVoid</strong> — <a href="https://www.urlvoid.com">www.urlvoid.com</a><br> <strong>Google Safe Browsing</strong> — transparencyreport.google.com/safe-browsing</p><h3>Hands-On Activity: Analyzing Real &amp; Fake URLs</h3><h4>Task 1: Spot the Fake URL</h4><p>Below are three URLs — identify which one is malicious:</p><ol><li><a href="https://secure-paypal.com/verify">https://secure-paypal.com/verify</a></li><li><a href="https://www.paypal.com/secure-login">https://www.paypal.com/secure-login</a></li><li><a href="http://paypa1.com/reset-password">http://paypa1.com/reset-password</a></li></ol><p>Correct Answer: <strong>1 &amp; 3 are malicious.</strong></p><ul><li>secure-paypal.com is <strong>not</strong> the official PayPal site.</li><li>paypa1.com uses <strong>&quot;1&quot; instead of &quot;l&quot;</strong>, a classic phishing trick.</li></ul><h4>Task 2: Check a Suspicious Link in VirusTotal</h4><ol><li>Go to <a href="https://www.virustotal.com">VirusTotal</a>.</li><li>Copy a suspicious link and paste it into the search bar.</li><li>Analyze the results — red flags indicate a malicious link.</li></ol><h3>How Cybercriminals Use Suspicious Links</h3><h3>Phishing Techniques</h3><p><strong>Email Phishing</strong> — Fake invoices, password reset emails.<br> <strong>SMS Phishing (Smishing)</strong> — Fake OTP requests, banking scams.<br> <strong>Social Media Scams</strong> — Fake giveaways, job scams.</p><h3>Drive-By Downloads &amp; Watering Hole Attacks</h3><p><strong>Drive-By Downloads</strong> — Clicking a link automatically downloads malware.<br><strong>Watering Hole Attack</strong> — Hackers infect trusted websites to target visitors.</p><h3>Case Study Discussion: Recent Cyber Attacks Involving Links</h3><p><strong>Attack: 2023 Microsoft Teams Phishing Scam</strong><br> 🔹 Cybercriminals sent fake meeting links via Microsoft Teams chat.<br> 🔹 Victims were redirected to a fake login page to steal credentials.<br> 🔹 <strong>Lesson:</strong> Always verify links before clicking, even in work emails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dEcaWsZudPZoBcQgp2ryUw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b54845a86f9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detecting Web Attack]]></title>
            <link>https://medium.com/@shiblysadik/detecting-web-attack-from-letsdefend-1f1a1afac3bf?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f1a1afac3bf</guid>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[idor]]></category>
            <category><![CDATA[remote-file-inclusion]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[web-attack]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Fri, 12 Jan 2024 23:00:49 GMT</pubDate>
            <atom:updated>2024-01-12T23:02:50.105Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>We have prepared the Web Attacks 101 training to provide a better understanding of cyber attacks (of which 75% are web based applications) and how to respond to these attacks.</p><h3>What are Web Attacks?</h3><p>Web applications are applications that provide services for users through a browser interface. Today web applications make up a large portion of internet usage. Sites such as Google, Facebook and YouTube (excluding the mobile applications) are actually web applications.</p><p>Because web applications are an interface on the internet for many organizations, attackers could exploit these applications and infiltrate into devices, they could capture personal data or cause</p><p>service breakdowns inflicting a serious amount of financial damage.</p><p>A study by Acunetix determined that 75 % of all cyber attacks performed were at the web application level.</p><p>Below you will find some attack methods used to infiltrate web applications. We will address these methods in our “Web Attacks 101” course; we will explain what these methods are, how and why attackers use them and how we can detect such activities.</p><ul><li>SQL Injection</li><li>Cross Site Scripting</li><li>Command Injection</li><li>IDOR</li><li>RFI &amp; LFI</li><li>File Upload (Web Shell)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*iCC3MQ6KgR_pNJ0SYWJksA.png" /></figure><h3>Why Detecting Web Attacks Important</h3><p>When you look at the daily life of the Average Joe you will see that he uses many web applications throughout the day. There are those who visit Spotify to listen to music, those who visit YouTube to watch videos or those who use social media.</p><p>It is no surprise that attackers choose web applications as a gateway for their attacks because all institutions have web applications which mostly contain critical data and because modern day applications are highly complicated and have numerous attack vectors. A study conducted by Acunetix reimburses this idea.</p><blockquote><em>“””Recent research shows that 75% of cyber attacks are done at the web application level.“”” [1]</em></blockquote><p>If we examine the anatomy of an attack, we see that the best scenario is to prevent the attack in its first phase. For this reason, there are various security precautions that aim to prevent and detect web applications (WAF, IPS, SIEM rules…).</p><p>It is crucial that a SOC analyst detects these web application based attacks which are the preference of attackers and takes precautions against them.</p><p><strong>Reference</strong></p><p>[1] <a href="https://www.acunetix.com/websitesecurity/web-application-attack/">https://www.acunetix.com/websitesecurity/web-application-attack/</a></p><h3>OWASP</h3><p>The Open Web Application Security Project (OWASP) is a nonprofit foundation that works to improve the security of software.[1]</p><p>It goes without doubt that OWASP is one of the best resources to gain information about web application security</p><h3>OWASP Top Ten</h3><p>OWASP publishes a list of 10 web application vulnerabilities that possess the most critical security risks every couple of years. As of the writing of this article, the latest publication was in 2021.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/0*1TF3cOGKadokMev1.png" /></figure><p>The OWASP list published in 2021 contains these critical security risks:</p><ol><li>Broken Access Control</li><li>Cryptographic Failures</li><li>Injection</li><li>Insecure Design</li><li>Security Misconfiguration</li><li>Vulnerable and Outdated Components</li><li>Identification and Authentication Failures</li><li>Software and Data Integrity Failures</li><li>Security Logging and Monitoring Failures</li><li>Server-Side Request Forgery (SSRF)</li></ol><p>You can read the OWASP publication which contains the most critical security risks <a href="https://owasp.org/">here</a>.</p><p><strong>References</strong></p><p>[1] <a href="https://owasp.org/">https://owasp.org/</a></p><h3>How Web Applications Work</h3><p>In order to detect an anomaly we should first understand how the technology works. Applications utilize certain protocols to communicate accurately with each other. Web applications communicate via the Hyper-Text Transfer Protocol (HTTP). Let’s look into how the HTTP protocol works.</p><p>For a start, it’s important to know that the HTTP protocol is on the 7th layer of the OSI model. This means that protocols such as the Ethernet, IP, TCP, and SSL are used before the HTTP protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/0*hxbCjArLlpJw8w3I.png" /></figure><p>HTTP communication takes place between the server and the client. First, the client requests a specific resource from the server. The server receives the HTTP request and sends back an (HTTP Response) to the client after passing it through certain controls and processes. The client’s device receives the response and displays the requested resource in an appropriate format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/0*BBAtQ8FiBNCLR3Cv.png" /></figure><p>Let’s examine HTTP Requests and HTTP Responses in more detail.</p><h3>HTTP Requests</h3><p>An HTTP Request is used to retrieve a certain resource from a web server. This resource may be an HTML file, video, or json data etc. The web server’s job is to process the received response and present it to the user.</p><p>There is a standard HTTP format, and all requests must comply with this format so web servers can understand the request. If the request is sent in a different format, then the web server will not understand it and it will send an error to the user or the web server may not be able to provide service (which is another attack type).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*RwOmAnXNBTZr0gOY.png" /></figure><p>An HTTP Request consists of a request line, request headers and a request message body. A request line consists of the HTTP method and the resource requested from the web server. The request header contains certain headers that the server will process. The request message body contains data that is intended to be sent to the server.</p><p>In the image above you see an example of an HTTP Request. Let’s examine this HTTP Request line by line.</p><ol><li>The GET method states that the resource “/” is requested from the server. Because there is no name, rather a symbol such as “/” means that the web server’s main page is requested.</li><li>Nowadays there are web applications that belong to more than one domain found on a single web server, so browsers use“Host” header to describe which domain the requested resource belongs to.</li><li>When a web application wants to store information on the client’s device it stores it in a “Cookie” header. Cookies are generally used to store session information. Therefore, you do not have to re enter your username and password when you visit a web application that requires login.</li><li>The “Upgrade-Insecure-Requests” header is used to state that the client wants to communicate with encryption (SSL).</li><li>There is information regarding the client’s browser and operating system under the “User-Agent” header. Web servers use this information to send specific HTTP Responses to the client. You can find some automated vulnerability scanners by looking under this header.</li><li>The type of data requested is found under the “Accept” header.</li><li>The encoding type that the client understands is found under “Accept-Encoding” header. You can usually find compression algorithm names under this header.</li><li>Under the “Accept-Language” header you can find the clients language information. The web server uses this information to display the prepared content in the client’s language.</li><li>The “Connection” header shows how the HTTP connection will be made. If there is any data such as “close” found here, it means that the TCP connection will be closed after the HTTP response is received. If you see “Keep-alive” this means that the connection will be continued.</li><li>An empty line is put between the HTTP Request Header and the HTTP Request Message Body to make a partition.</li><li>Other data intended to be sent to the web application is found within the Request Message Body. If the HTTP POST method is used, then POST parameters can be found here.</li></ol><h3>HTTP Responses</h3><p>Once the web server receives an HTTP Request, it performs the required controls and processes and then sends the requested resource to the client. There is no uniform process here because there are numerous technologies and designs involved. The server may pull data from the database according to what the requested resource is, or it can process according to incoming data. But the HTTP Response Message must reach the client after all the processing.</p><p>A HTTP Response Message contains a Status Line, Response Headers, and a Response Body. The Status Line contains the status code (such as 200: OK) and HTTP protocol information. There are headers used for numerous purposes within the Response Header. Data related to the requested resource is found within the Response Body.</p><p>If a web page was requested, there will usually be HTML codes in the Response Body. When the client receives the HTML code, the web browser processes the HTML code and displays the web page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/0*NTNyXZ5OXFUb_7uo.png" /></figure><p>You can see a HTTP Response request in the image above. Let’s examine a HTTP Response request based on this image.</p><p><strong>Status Line</strong></p><p>There is information about the HTTP version and HTTP response status code in the Status Line. HTTP response status code is used to describe the status of the request. There are many HTTP response status codes, but they can be summarized as so:</p><p>● <strong>100–199</strong>: Informational responses</p><p>● <strong>200–299</strong>: Successful responses</p><p>● <strong>300–399</strong>: Redirection messages</p><p>● <strong>400–499</strong>: Client error responses</p><p>● <strong>500–599</strong>: Server error responses</p><p><strong>Response Headers</strong></p><p>Here are some HTTP Response Headers that you may come across frequently:</p><p>● <strong>Date</strong>: The exact time the server sent the HTTP Response to the client.</p><p>● <strong>Connection</strong>: It states how the connection will be handled, just like in the HTTP Request header.</p><p>● <strong>Server</strong>: Information about the server’s operating system and the web server’s version.</p><p>● <strong>Last-Modified</strong>: Information about when the requested resource was changed. This header is used for the cache mechanism.</p><p>● <strong>Content-Type</strong>: The type of data that is sent.</p><p>● <strong>Content-Length</strong>: The size of the data sent.</p><p><strong>Response Body</strong></p><p>The HTTP Response Body contains the resource that was sent by the server and requested by the client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/0*tVANU8Z_mKnSU0l1.png" /></figure><h3>Detecting SQL Injection Attacks</h3><h3>What is SQL Injection (SQLi)?</h3><p>SQL Injections are critical attack methods where a web application directly includes unsanitized data provided by the user in SQL queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/0*28UPl09Z-LiJSQog.png" /></figure><p>The frameworks we use these days to develop web applications have preventative mechanisms in place to protect against SQL Injection attacks. But we still come across SQL Injection vulnerabilities because sometimes raw SQL queries are used, sometimes the framework has an innate SQL Injection vulnerability or the framework is not used properly.</p><h3>SQL Injection Types</h3><p>There are 3 types of SQL Injections. These are:</p><ol><li><strong>In-band SQLi (Classical SQLi)</strong>: If a SQL query is sent and replied to over the same channel, we call these In-band SQLi. It is easier for attackers to exploit these compared to other SQLi categories.</li><li><strong>Inferential SQLi (Blind SQLi):</strong> SQL queries that receive a reply that cannot be seen are called Inferential SQLi. They are called Blind SQLi because the reply cannot be seen.</li><li><strong>Out-of-band SQLi</strong>: If the reply to a SQL query is communicated over a different channel then this type of SQLi is called Out-of-band SQLi. For example, if the attacker is receiving replies to his SQL queries over the DNS this is called an out-of-band SQLi.</li></ol><h3>How Does SQL Injection Work?</h3><p>Today standard web applications most commonly receive data from a user and use this data to display specific content. The login page is where most SQL Injection attacks happen. Let’s examine how SQL injections work through an example.</p><p>A user is generally expected to enter his/her username and password on the login page. On the other side, the web application will use this username and password information to create a SQL query like the one below:</p><blockquote><em>SELECT * FROM users WHERE username = ‘</em><strong><em>USERNAME</em></strong><em>’ AND password = ‘</em><strong><em>USER_PASSWORD</em></strong><em>’</em></blockquote><p>The meaning of this SQL query is “bring me all the information about the user from the users table whose name is <strong>USERNAME</strong> and whose password is <strong>USER_PASSWORD</strong>”. If the web application does find a matching user, it will authenticate the user, if it cannot find a user after the query is performed then the login will be unsuccessful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/0*eMU63PxOybeVlRuX.png" /></figure><p>Let’s say your username is “<strong>john</strong>”, and your password is “<strong>supersecretpassword</strong>”. When you enter this information and click on the login button the SQL query you see below will be queried and you will be able to enter because there was a match found after the SQL query.</p><blockquote><em>SELECT * FROM users WHERE username = ‘</em><strong><em>john</em></strong><em>’ AND password = ‘</em><strong><em>supersecretpassword</em></strong><em>’</em></blockquote><p>So, what if we did not use this system the way it was designed and we put an apostrophe (‘) in the username area? The SQL query will be as below and the error will be excluded from the database because the query was faulty.</p><blockquote><em>SELECT * FROM users WHERE username = ‘</em><strong><em>john</em></strong><em>’’ AND password = ‘</em><strong><em>supersecretpassword</em></strong><em>’</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/0*H_4Wqi5d-saFjVIM.png" /></figure><p>An attacker would be glad to get an error message. Attacker can both manipulate the information in the error message for his own advantage and it also shows him that he is on the right path. What if the attacker enters a payload like the one below into the username area?</p><blockquote><em>‘ OR 1=1 — -</em></blockquote><p>When the attacker sends the payload the web application will execute the following SQL query:</p><blockquote><em>SELECT * FROM users WHERE username = ‘’ OR 1=1 — — AND password = ‘</em><strong><em>supersecretpassword</em></strong><em>’</em></blockquote><p>In SQL, whatever characters come after “ — -” will be perceived as a comment line. So if we look at the query above, the queries that come after “ — -” do not mean anything. So let’s remove this part in order to simplify things before we continue to examine the SQL query.</p><blockquote><em>SELECT * FROM users WHERE username = ‘’ OR 1=1</em></blockquote><p>So now the query above looks like this: “<strong>if the username is empty or 1=1</strong>”. It is not really important whether the username area is left empty or not because 1 is always equal to 1. That is why this query will always be true and it will most probably call the first entry in the database. The attacker will be able to successfully enter the web application because there is a match.</p><p>This example is a typical SQL injection attack. Of course SQL injection attacks are not limited to this example, the attacker could use SQL to execute commands in the system with the help of SQL commands such as <strong>xp_cmdshell.</strong></p><h3>How Attackers Leverage with SQL Injection Attacks</h3><p>In order to understand why SQL Injection attacks are so critically important, let’s take a look at what a SQL injection attack can cause.</p><ul><li>Authentication bypass</li><li>Command execution</li><li>Exfiltrating sensitive data</li><li>Creating/deleting/updating database entries</li></ul><h3>How to Prevent SQL Injections</h3><ul><li><strong>Use a framework:</strong> of course just using a framework will not be sufficient to prevent a SQL Injection attack. It is of utmost importance to use the framework in accordance with documentation.</li><li><strong>Keep your framework up to date:</strong> Keep your web application secure by following security updates related to the framework you use.</li><li><strong>Always sanitize data received from a user:</strong> Never trust data received from a user. On top of that do not only sanitize the form data but also do the same with other data (such as Headers, URLs, etc.)</li><li><strong>Avoid using raw SQL queries:</strong> You may have a habit of writing raw SQL queries but you should opt to make use of the benefits a framework provides and you should also make use of the security it provides.</li></ul><h3>Detecting SQL Injection Attacks</h3><p>We have discussed what attackers can do with a SQL Injection attack in the previous section. Each of the results of a SQL Injection stated above could cause great loss for an institution so as SOC Analysts we should be able to detect these attacks and be able to take precautions against them.</p><p>So, how can we detect SQL Injection attacks?</p><p>There is more than one answer to this question. These are:</p><ul><li><strong>When examining a web request check all areas that come from the user: </strong>Because SQL Injection attacks are not limited to the form areas, you should also check the HTTP Request Headers like User-Agent.</li><li><strong>Look for SQL keywords: </strong>Look for words like INSERT, SELECT, WHERE within the data received from users.</li><li><strong>Check for special characters: </strong>Look for apostrophes (‘), dashes (-), or parentheses which are used in SQL or special characters that are frequently used in SQL attacks within the data received from the user.</li><li><strong>Familiarize yourself with frequently used SQL Injection payloads:</strong> Even though SQL payloads change according to the web application, attackers still use some common payloads to check for SQL Injection vulnerabilities. If you are familiar with these payloads, you can easily detect SQL Injection payloads. You can see some frequently used SQL Injection payloads <a href="https://github.com/payloadbox/sql-injection-payload-list">here</a>.</li></ul><h3>Detecting Automated SQL Injection Tools</h3><p>Attackers use many automated devices to detect SQL Injection vulnerabilities. One of the most well known is Sqlmap. Let’s look at the wider picture instead of focusing on a specific tool.</p><p>You may use the methods listed below to detect SQL Injection devices:</p><ol><li><strong>Look at the User-Agent: </strong>Automated browser devices generally have their names and versions recorded. You can look at the User-Agent to detect these automated devices.</li><li><strong>Check the frequency of requests: </strong>Automated devices were designed to send an estimated amount of many requests per second to be able to test payloads as quickly as possible. A normal user could send 1 request per second, so you can tell if the requests are made by an automated device or not by looking at the number of requests per second.</li><li><strong>Look at the contents of the payload: </strong>Automated devices usually record their own names in their payloads. For example a SQL Injection payload sent by an automated device could look like this: <strong>sqlmap’ OR 1=1</strong></li><li><strong>Is the payload complicated: </strong>This detection method may not always work but based on my experience, I could say that automated devices send more complicated payloads.</li></ol><h3>Detection Example</h3><p>We have access logs of a web application that was victim to a SQL Injection attack.</p><p>You may not have heard what an access log is before. In short, these are the web server’s access logs. These logs usually contain the source IP address, date, requested URL, HTTP method, user-agent and HTTP Response code. These logs are very useful in investigations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y6PHrP2JnSn2X1rY.png" /></figure><p>(SQL Injection Access Logs)</p><p>We have an access log in hand. Now what do we do?</p><p>Firstly, when we look at the pages that were requested we see that besides pages like “info.php” which is fairly readable, there are also requests made for pages that are complex and have symbols like %. We cannot say that requests for pages like these are malicious but the fact that they are made repetitively and many times is suspicious.</p><p>First of all, let’s talk about what the % symbols mean. When we request a page that contains special characters, these requests are not directly transferred to the web server. Instead, our browsers perform a URL encoding (Percent Encoding) of the special characters and replaces each special character with a character string that begins with % and has 2 hexadecimal characters in it. So the pages containing the % symbol above are pages that contain special characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/0*K5l16WctVwVw5xgV.png" /></figure><p>Now that we understand what the % symbols mean, let’s revisit the access logs. When we look at the requests, we can easily see that besides the % symbols there are readable words such as “UNION”, “SELECT”, “AND”, “CHR”. Because these are specific words that belong to SQL, we can determine that we are face to face with a SQL Injection attack.</p><p>To save our eyes, let’s make the examination a little easier :) You can conduct a search using the keywords “Online URL Decoder” to find web applications that will automatically do the URL decoding for you. In order to read these access logs easier I will get help from these web applications, by doing so I won’t have to strain my eyes or yours.</p><p>Let me add a little note. It is not wise to upload something like an access logs which contain critical information on a 3rd party web application. The access logs I uploaded were prepared specifically for this training so there is no problem in my doing so. But you shouldn’t make such mistakes in your professional life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4nDWyiUVey3r-Dsd.png" /></figure><p>When we do the URL decoding we can more clearly see that this is a SQL Injection attack. So what should we do now? Yes, we have confirmed that it is a SQL Injection attack but do we leave it there?</p><p>Of course not. Now we are going to find any other pieces of information that we can from these access logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CWJAYx572pVqL58q.png" /></figure><p>First, let’s look at the request dates. All the SQL Injection payloads were sent on “19/Feb/2022 11:09:24”. We can see that more than 50 requests were made in 1 second. The fact that so many requests were made in such a short time shows us that this is an automatized attack. Additionally, as we have mentioned before, when attackers perform manual tests they choose to test easy payloads first. But when we look at the access logs we see that the payloads are very complicated. This goes to show that the attack may very well be automated.</p><p>We have confirmed that a SQL Injection attack has been performed and that it has been performed with an automated device. So we can end our analysis, right?</p><p>There is one more step left to do. We need to determine whether the attack was successful or not. You can determine whether a SQL Injection attack has been successful by looking at the response but in your professional career you will almost never have access to the response. We can presume that all responses will be about the same size because the attack is performed on the same page and over the “id” variable. We can estimate the success of the attack by looking at the size of the response.</p><p>Unfortunately, the basic web server that was developed to serve as an example cannot supply a reliable response size. Therefore, we cannot estimate if the attack has been successful looking at this example. But with web servers that have been configured correctly, we can find the response size within the access logs. You can examine this area to determine whether there is a notable difference in response sizes. If there is a notable difference you can estimate that the attack has been successful. But in this situation it would be best to escalate this alert to a higher-tier analyst.</p><p>What we know:</p><ol><li>There has been a SQL Injection attack performed on the “id” parameter on the web application’s main page.</li><li>The requests came from the IP address: 192.168.31.174.</li><li>Because there have been 50+ requests per second, this attack has been performed by an automated vulnerability scanning tool.</li><li>The complex nature of the payloads supports the claim in # 3.</li><li>We cannot determine whether the response was successful or not because we do not have any information about the response size.</li></ol><h3>Detecting Cross Site Scripting (XSS) Attacks</h3><h3>What is Cross Site Scripting (XSS)?</h3><p>Cross Site Scripting (XSS), is a type of injection based web security vulnerability that is included in legitimate web applications and enables malicious code to be run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/0*kvLg0TwclHPcejOK.png" /></figure><p>Today most frameworks that are used to develop web applications have taken preventative measures against cross-site scripting attacks. But we still frequently see XSS vulnerabilities today because frameworks are sometimes not used, or the framework itself has an XSS vulnerability and the data coming from the user is not sanitized.</p><h3><strong>XSS Types</strong></h3><p>There are 3 different types of XSS. These are:</p><ol><li><strong>Reflected XSS (Non-Persistent)</strong>: It is a non-persistent XSS type that the XSS payload must contain in the request. It is the most common type of XSS.</li><li><strong>Stored XSS (Persistent)</strong>: It is a type of XSS where the attacker can permanently upload the XSS payload to the web application. Compared to other types, the most dangerous type of XSS is Stored XSS.</li><li><strong>DOM Based XSS</strong>: DOM Based XSS is an XSS attack wherein the attack payload is executed as a result of modifying the DOM “environment” in the victim’s browser used by the original client side script, so that the client side code runs in an “unexpected” manner. (OWASP)</li></ol><h3>How XSS Works?</h3><p>Just like other web attack methods, XSS is a security vulnerability that happens due to the lack of data sanitization. XSS vulnerability occurs when the data received from the user is sent in the response without sanitizing.</p><p>Let’s follow an example to better understand XSS attacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/0*O8VjvIcn0KQ9TgmB.png" /></figure><p>Let’s look at the piece of code above. What it does is actually very basic. It merely displays whatever is entered in the ‘user’ parameter. If we enter “LetsDefend” as the ‘user’ parameter, we will see the words “Hello LetsDefend”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/0*SKQm3SACO7iV1PYY.png" /></figure><p>Up till now, there is no problem. If we enter the appropriate data in the user parameter, we are greeted with a warm salutation. But, as we have seen above, there is no control mechanism for the user parameter. This means that whatever we enter in the “user” parameter will be included in the HTTP Response that we receive back.</p><p>So,what would happen if we didn’t enter a normal value but instead we entered a payload that would summon a pop-up?</p><p>Payload: <strong>&lt;script&gt;alert(1)&lt;/script&gt;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1q0g2kv4jnZUwEtI.png" /></figure><p>Because whatever we enter in the “user” parameter is directly included in the HTTP Response, the javascript code we wrote worked and a pop-up window appeared on the screen.</p><p>So, this is exactly how XSS works. Because the value entered by the user is not confirmed, the attacker may enter whatever javascript code he likes and get the result he wants. What if the attacker wants to redirect the user to a malicious site?</p><p>Payload: <strong>&lt;script&gt;window.location=’https://google.com’&lt;/script&gt;</strong></p><p><a href="https://letsdefend.io/xss_example.php?user=%3Cscript%3Ewindow.location=%27https://google.com%27%3C/script%3E">https://letsdefend.io/xss_example.php?user=%3Cscript%3Ewindow.location=%27https://google.com%27%3C/script%3E</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/0*0htL5Q4qXrmY2Z6L.png" /></figure><p>Of course we are not going to direct you to a web application. Directing you to Google will be sufficient as an example. When the user clicks on the URL he will be directed to Google instead of the perfect LetsDefend web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lhzlsEFOtM3ty8IK.png" /></figure><h3>How Attackers Leverage with XSS Attacks</h3><p>Because XSS is a client-based attack method, it may seem less important than other attack methods but XSS attacks and their impact should not be taken for granted.</p><p>Attackers can do the following with an XSS attack:</p><ul><li>Steal a user’s session information</li><li>Initiate processes that a user can</li><li>Capture credentials</li></ul><p>…and other various functions.</p><h3>How to Prevent a XSS Vulnerability</h3><ul><li><strong>Sanitize data coming from a user: </strong>Never trust data coming from a user. If user data needs to be processed and saved it should be encoded with html encoding using special characters and only then should it be saved.</li><li><strong>Use a framework: </strong>Most frameworks come with preventive measures against XSS attacks.</li><li><strong>Use the framework correctly: </strong>Almost all frameworks used to develop web applications come with a sanitation feature but if this is not used properly there still is a chance for XSS vulnerabilities to occur.</li><li><strong>Keep your framework up to date: </strong>Frameworks are developed by humans so they too may contain XSS vulnerabilities. But these kinds of vulnerabilities are usually patched by security updates. So you should make sure that you have completed your framework’s security updates.</li></ul><h3>Detecting XSS Attacks</h3><p>Like we mentioned in the previous article, according to a study done by Acunetix, 75% of cyber attacks are performed over web applications. Because XSS is one of the most frequently tested vulnerabilities, you will be seeing a lot of these during your career as a SOC analyst.</p><ul><li><strong>Look for keywords: </strong>The easiest way to catch XSS attacks is to look for keywords such as “alert” and “script” which are commonly used in XSS payloads.</li><li><strong>Familiarize yourself with frequently used XSS payloads: </strong>Attackers primarily use the same payloads to look for vulnerabilities before they exploit a XSS vulnerability. This is why familiarizing yourself with frequently used XSS payloads would make it easier for you to detect XSS vulnerabilities. You can examine some frequently used payloads <a href="https://github.com/payloadbox/xss-payload-list">here</a>.</li><li><strong>Check if any special characters have been used: </strong>Check data coming from a user to see if any special characters that are frequently used in XSS payloads like greater than (&gt;) or lesser than (&lt;) are present.</li></ul><h3>Example of a Detection</h3><p>In this example, we see access logs from an Apache server with Wordpress. Don’t forget to revisit our article on “Detecting SQL Injection Attacks” for more information about access logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dV0Xj2bWFXPZGp2d.png" /></figure><p>Now, let’s examine the access logs that have been provided.</p><p>Firstly, let’s take a general look at the requests that have been made and try to understand them. We see that all the requests have been made for the “/blog/” page and that only the “s” parameter values have been changed. If you pay attention to the URLs of the web pages you visit, you would have noticed that when you perform a search in Wordpress, the words you enter are sent using the “?s=” parameter. The example we are looking at shows us that these are searches performed in Wordpress.</p><p>It is hard to find easily readable examples like the example in the “Detecting SQL Injection Attacks” article. Instead, we find characters that have transformed into %XX as a result of URL encoding. We will perform URL decoding next but first let’s take a look at the URLs and try to see if we can recognize any words.</p><p>When we look at the logs, we notice javascript related words such as “script”, “prompt”, and “console.log”. When we see javascript it immediately brings XSS to mind. If we do a URL decoding we will easily be able to understand the requests that are made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FyCRcXE3snMitGbw.png" /></figure><p>When we take another look at the access logs after performing a URL decoding we clearly see the XSS payloads. We can definitely say that the Wordpress application which we got these access logs from has become the victim of a XSS attack.</p><p>When we look at the requested IP addresses, we see there are more than one. Are more than one attackers trying to perform a XSS attack simultaneously? Or is the attacker constantly changing his IP address to avoid being blocked by security products such as firewalls and IPS? If you check the IP address you will see that it belongs to Cloudflare. Because the Wordpress application has been put behind Cloudflare, it is quite normal that Cloudflare is making the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BRmKQcxf8vozFR8b.png" /></figure><p>When we examine the dates of the requests, we find that there was a request made every 3–4 seconds. It is not really possible for a human to try to enter this many XSS payloads in such a short time but you may not be able to be sure that the number of requests made per second is excessive. We are lucky because we have the User-Agent information in this example. If we examine this information we see that it belongs to a urllib library. This shows us that these requests were made through an automated vulnerability scanner tool.</p><p>So was the attack successful?</p><p>We cannot say anything definite because we don’t have access to the responses.</p><p>As a result of our examinations:</p><ol><li>It is determined that the attack targeted the web application where the access logs came from.</li><li>After looking at the amount of requests and the User-Agent information we determined that the attack was performed by an automated vulnerability scanner.</li><li>Because the application is behind Cloudflare the source IP addresses were not found.</li><li>We do not know whether the attack was successful or not.</li></ol><h3>Detecting Command Injection Attacks</h3><h3>What are Command Injection Attacks?</h3><p>Command Injection Attacks are attacks that happen when the data received from a user is not sanitized and is directly transmitted to the operating system shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/0*ASGAAHPybhR2I_Ss.png" /></figure><p>Attackers exploit command injection vulnerabilities to directly execute commands on the operating system. The fact that the attacker’s priority is to take control of the system makes these vulnerabilities more critical than other vulnerabilities.</p><p>Because the command that the attacker sends will be using the rights of the web application user, a misconfigured web application would grant the attacker access with admin rights.</p><h3>How Command Injection Works?</h3><p>Command injection vulnerabilities happen when the data received from the user is not sanitized. Let’s examine command injection vulnerabilities with an example.</p><p>Let’s say we have a basic web application that copies the user’s file in the “/tmp” folder. The web application’s code is below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/0*ANFFkp512eaKUuId.png" /></figure><p>Under normal conditions the application will work normally if used accurately. For example if we load a file named “letsdefend.txt” it will successfully copy the file to the “/tmp” folder.</p><p>So, what will happen if we upload a file named “letsdefend;ls;.txt”? The command would become:</p><p>Command: <strong>cp letsdefend;ls;.txt</strong></p><p>“;” signifies that the command has ended. So when we look at the payload above, there are three different commands that the operating system executes. These are:</p><ol><li>cp letsdefend</li><li>ls</li><li>.txt</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/0*tKjm-uMq7n-a7WTa.png" /></figure><p>The first command is for the copying process but if the parameters are not entered correctly it will not work correctly.</p><p>Command #2 is the directory listing command the attacker wants to execute. The user does not receive the command output so the attacker cannot see the files in the directory but the operating system successfully executes the command.</p><p>When the operating system wants to execute command number 3 there will be an error message because there is no “.txt” command.</p><p>As you see, the code has been executed in the web server’s operating system. So, what if the attacker uploads a file named ““letsdefend;shutdown;.txt”? The operating system would shut itself down, and the web application will not be able to function.</p><p>The attacker can create a reverse shell in the operating system with the help of the accurate payload.</p><h3>How Attackers Leverage with Command Injection Attacks</h3><p>Attackers can execute commands on an operating system by exploiting command injection vulnerabilities. This means that the web application and all other components on the server are at risk.</p><h3>How to Prevent Command Injection</h3><ul><li><strong>Always sanitize data received from a user:</strong> Never trust data received from a user. Not even a file name!</li><li><strong>Limit user rights: </strong>Adjust web application user rights to a lower level whenever possible. Hardly any web application requires the user to have admin rights.</li><li><strong>Make use of virtualization technologies such as dockers</strong></li></ul><h3>Detecting Command Injection Attacks</h3><p>I think we all understand the criticality level of Command Injection vulnerability very well. If such a critical vulnerability is exploited and gone undetected the company involved may lose a great amount of money and reputation.</p><p>So, how can we detect Command Injection Attacks?</p><p>There is more than one way. These are:</p><ul><li><strong>When examining a web request look at all the areas: </strong>The command injection vulnerability may be located in various areas depending on the operation of the web application. This is why you should check all areas of the web request.</li><li><strong>Look for keywords related to the terminal language: </strong>Check the data received from the user for keywords that are related to terminal commands such as: dir, ls, cp, cat, type, etc.</li><li><strong>Familiarize yourself with frequently used Command Injection payloads: </strong>When attackers detect a command injection vulnerability they usually create a reverse shell in order to work more easily. This is why knowing frequently used Command Injection payloads will make it easier to detect a command injection attack .</li></ul><h3>Detection Example</h3><p>In this example we will not be looking at access logs, rather we will be examining a HTTP Request.</p><blockquote><em>GET / HTTP/1.1</em></blockquote><blockquote><em>Host: yourcompany.com</em></blockquote><blockquote><em>User-Agent: () { :;}; echo “NS:” $(&lt;/etc/passwd)</em></blockquote><blockquote><em>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9</em></blockquote><blockquote><em>Accept-Encoding: gzip, deflate</em></blockquote><blockquote><em>Accept-Language: en-US,en;q=0.9</em></blockquote><blockquote><em>Connection: close</em></blockquote><p>If we look at the HTTP Request above, we see that the main page of the web application yourcompany[.]com has been requested.</p><p>But when we look at the HTTP Request Headers we see a suspicious situation in the User-Agent header. There is a bash command in the User-Agent header whereas there should be browser/operating system information here.</p><p>Actually, this request was captured during the exploitation of a vulnerability named Shellshock. Shellshock is a security weakness that was published in 2014 and had great effects.</p><p>Shellshock is a security vulnerability that originates from bash somehow involuntarily executing Environment Variables. Shellshock is a great example of a command injection attack.</p><p>When the bash command which is located within User-Agent is executed, the “/etc/passwd” file’s contents will be returned to the attacker in the HTTP Response header as “NS”.</p><h3>Detecting Insecure Direct Object Reference (IDOR) Attacks</h3><h3>What is IDOR?</h3><p><strong>I</strong>nsecure <strong>D</strong>irect <strong>O</strong>bject<strong> R</strong>eference (IDOR), is a vulnerability caused by the lack of an authorization mechanism or because it is not used properly. It enables a person to access an object that belongs to another.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*s1z_38dcwunEUE4T.png" /></figure><p>Among the highest web application vulnerability security risks published in the 2021 OWASP, IDOR or “Broken Access Control” takes first place.</p><h3>How IDOR Works</h3><p>IDOR is not a security vulnerability caused by unsanitary conditions like other web application based security vulnerabilities. The attacker manipulates the parameters sent to the web application, gains access to an object that doesn’t belong to himself and is able to read, change or erase the contents.</p><p>Here’s an example to better understand how the IDOR vulnerability is exploited.</p><p>Let’s imagine a basic web application. It retrieves the “<strong>id”</strong> variable from the user, then it displays data that belongs to the user who made the request.</p><p>URL: <a href="https://letsdefend.io/get_user_information?id=1"><strong>https://letsdefend.io/get_user_information?id=1</strong></a></p><p>When a request is made in our web application, like the one above, it displays the information of the user with an id value of 1.</p><p>If I am the user who made the request and my id value is 1 everything will work normally. When I make the request I will see my personal information.</p><p>But what happens if we make a request with 2 as the “id” parameter? Or 3?</p><p>If the web application is not controlling: “Does the “id” value in the request belong to the person making the request?” then anyone can make this request and see my personal information.This web vulnerability is called IDOR.</p><p>Attackers can reach objects that do not belong to themselves by changing parameters like the “id”. What kind of information they can gain access to may change according to the web application but either way you wouldn’t want anyone to access your personal information, right?</p><h3>How Attackers Leverage with IDOR Attacks</h3><p>What an attacker can do is limited by the area of an IDOR vulnerability. But the most common areas they are seen are usually pages where a user’s information is received. If an attacker exploits an IDOR vulnerability he could:</p><ul><li>Steal personal information</li><li>Access unauthorized documents</li><li>Conduct unauthorized processes (For example: deletion, alteration)</li></ul><h3>How to Prevent IDOR</h3><p>In order to establish a secure environment without an IDOR vulnerability you should always check if the person who made the request has any authority.</p><p>On top of this, unnecessary parameters should be removed and only the least amount of parameters should be taken away from the user. If we think about the previous example, we don’t need to get the “id” parameter. Instead of getting the “id” parameter from user, we can identify the person who made the request using the session information.</p><h3>Detecting IDOR Attacks</h3><p>IDOR attacks are more difficult to detect than other attacks. Because it does not have certain payloads such as SQL Injection and XSS.</p><p>Having the HTTP Response at hand would help to identify IDOR attacks. But HTTP Responses are not logged for various reasons and thus it is harder to identify IDOR attacks.</p><p>There are a couple of methods used in identifying IDOR attacks. These are:</p><ul><li><strong>Check all parameters: </strong>an IDOR vulnerability may occur in any parameter. This is why you should not forget to check all parameters.</li><li><strong>Look at the amount of requests made for the same page: </strong>When attackers detect an IDOR vulnerability they also want to access the information related to all other users so they usually perform a brute force attack. This is why you may see many requests made for the same page from one source.</li><li><strong>Try to find a pattern: </strong>Attackers will plan a brute force attack to reach all objects. Because they will perform the attack on successive and foreseeable values like integer values you can try to find a pattern in these requests. For example: if you see requests such as id=1, id=2, id=3, you may suspect something.</li></ul><h3>Detection Example</h3><p>Below you can see a screen image of logs found on a web server running Wordpress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wdOiMta3EBqD2Y9E.png" /></figure><p>As in our other examples, let’s start with a general, broad based examination. Because there are no special characters included in the requests that were made we can easily read the logs.</p><p>If you have used the Wordpress application before you might know that the “wp-admin/user-edit.php?user_id=” page contains information about registered Wordpress users. It could be seen as normal to be able to access this page, in fact if you have more than one user you may be gaining access with more than one “user_id: parameter. But it is not normal to have this many different “user_id” parameters.</p><p>It looks like we have an IDOR attack on our hands.</p><p>When we look at what the source IP was we see it belongs to Cloudflare. This means that the web application that we received the access log for was using a Cloudflare service. This is why the requests were transmitted to the web application through Cloudflare.</p><p>We see 15–16 requests within the short time frame that access logs are recorded and this shows us that the attack is performed with an automated device. If we look at the User-Agent header we can see it says “wfuzz/3.1.0”. Wfuzz is a device that is frequently used by attackers. We did not only determine that this attack was performed by an automated scanner tool, we also determined that it was performed by a tool named Wfuzz.</p><p>But we still haven’t answered the most important question. Has the attack been successful?</p><p>Was the attacker able to gain access to the users’ information?</p><p>Our job would be easier if we had the HTTP Responses. Because we don’t have the HTTP Responses let’s look at the response size in the Access Logs and make an inference.</p><p>Like we mentioned before, the requested page was displaying user information. Information such as the users’ names, last names and usernames’ total size will not be the same. This is why we can ignore requests with a response size of 479 bytes.</p><p>If we look at the requests with a response size of 5691 and 5692, we see that the response code will be 302 (redirect). Successful web requests will generally be answered with the response code 200. So we can say that the attack was not successful. But this information alone may not be sufficient to determine the attack as unsuccessful.</p><p>There are 10 requests with the response size of 5692 and 4 with the response size of 5691.</p><p>Like we stated before, there is a very low possibility for the total of all information like the user’s name, last name, username to be equal. This strengthens the possibility that the attack was not successful.</p><h3>Detecting RFI &amp; LFI Attacks</h3><h3>What is Local File Inclusion (LFI)?</h3><p>Local File Inclusion (LFI), is the security vulnerability that occurs when a file is included without sanitizing the data obtained from a user. It differs from RFI because the file that is intended to be included is on the same web server that the web application is hosted on.</p><p>Attackers can read sensitive files on the web server, they can see the files that contain passwords that would enable them to reach the server remotely.</p><h3>What is Remote File Inclusion (RFI)?</h3><p>Remote File Inclusion (RFI), is the security vulnerability that occurs when a file is included without sanitizing the data obtained from a user. It differs from LFI in that the file that is intended to be included is hosted on a different server.</p><p>The attackers host malicious codes on their prepared server and they invite the victim website over the remote server and try to get it to execute.</p><h3>How LFI &amp; RFI Works?</h3><p>Just like most web application based vulnerabilities, LFI and RFI also have vulnerabilities caused by not sanitizing data received from a user.</p><p>SQL Injection vulnerabilities occur when data received from a user is entered in SQL queries; Command Injection vulnerabilities happen when data received from a user is executed directly in the system shell; IDOR vulnerabilities occur when data received from a user is used to directly access objects. RFI and LFI vulnerabilities are caused by the use of data received from a user directly in the system or to include a file on a remote server.</p><p>Why would data received from a user be used to include a file? Web applications have become highly complicated and unfortunately each feature that is developed is used for malicious purposes. The language option found in web applications is used in order to include files based on data received from a user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/0*vn9SX5DuxfrxwjkB.png" /></figure><p>If we examine the piece of code in the image above, we see that the desired website language is selected by using the “language” parameter received from the user.</p><p>In a normal situation the web application will work as planned. For example if “en” is entered as the “language” parameter we will receive the file seen below.</p><p>“website/<strong>en</strong>/home.php”</p><p>But if an attacker enters the payload seen below into the “language” parameter then unfortunately the web application will display the “/etc/passwd” file to the user.</p><p>Payload:<strong> /../../../../../../../../../etc/passwd%00</strong></p><p>“website/<strong>/../../../../../../../../../etc/passwd%00</strong>/home.php</p><p>“../” is used to go to the parent directory. Because the attacker does not know what directory the web application is in, he tries hard to reach the “root” directory using “../”. Later, he names the “/etc/passwd” file and enables the inclusion of the file within the web application. “%0” is used to end the string. This way, the remaining “/home.php” string is not read by the web application.</p><h3>How Attackers Leverage with RFI &amp; LFI</h3><ul><li>Code execution</li><li>Sensitive information disclosure</li><li>Denial of service</li></ul><h3>How to Prevent LFI &amp; RFI</h3><p>The most effective way to prevent RFI and LFI attacks is to sanitize any data received from a user before using it. Do not forget that client based controls are easily bypassed. This is why you should always do your controls on both the client-side and the server-side.</p><h3>Detecting LFI &amp; RFI Attacks</h3><p>We previously mentioned what attackers can accomplish with RFI and LFI attacks. Because a company can experience a great deal of loss due to the exploitation of such vulnerabilities we should be able to detect such attacks and take precautions.</p><p>How can we detect and prevent LFI and RFI attacks?</p><ul><li><strong>When examining a web request from a user, examine all the fields.</strong></li><li><strong>Check for any special characters: </strong>Within the data that is received from users, especially look for notations such as ‘/’, `.`, `\`.</li><li><strong>Familiarize yourself with files frequently used in LFI attacks: </strong>In an LFI attack the attacker reads the files that are on the server. If you familiarize yourself with the critical file names on the server, you can detect LFI attacks more easily.</li><li><strong>Search for acronyms such as HTTP and HTTPS: </strong>In RFI attacks the attacker includes the file on his own device and enables the file to execute.</li><li>In order to include a file, attackers usually set up a small web server on their own device and display the file over an HTTP protocol. This is why you should search for notations such as “http” and “https” to be able to detect RFI attacks more easily.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f1a1afac3bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential Linux Command For all [100+]]]></title>
            <link>https://medium.com/@shiblysadik/essential-linux-command-for-all-100-4330cbdde020?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4330cbdde020</guid>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Mon, 25 Dec 2023 14:33:24 GMT</pubDate>
            <atom:updated>2023-12-25T14:33:24.121Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*jtdaT4rkkvZAvkBKLUMwGg.png" /></figure><h3><strong>1.File Operation:</strong></h3><p>~<strong>ls</strong> : lists of all files and directories in the present working directory</p><p>~<strong>ls -R </strong>: lists files in sub-directories also</p><p>~<strong>ls -a</strong> : Shows hidden files</p><p>~<strong>ls al </strong>: Lists files and directories with detailed information like permissions, size, owner, etc.</p><p>~ <strong>cd directoryname</strong> : Changes the directory</p><p>~<strong>cd</strong> : Moves one level up</p><p>~ <strong>pwd</strong> : Displays the present working directory</p><p>~ <strong>touchfilename</strong> : Creates a new file</p><p>~<strong>cat filename</strong> : Displays the file content</p><p>~ <strong>cat file1 file2 file3</strong> : Joins two files (file1 and file2) and stores the output in a new file (file3)</p><p>~<strong>touch filename</strong> : Creates or modifies a file</p><p>~<strong>rm filename</strong> : Deletes a file</p><p>~<strong>cp source destination</strong> : Copies files from the source path to the destination path</p><p>~ <strong>mv source destination</strong> : Moves files from the source path to the destination path</p><p>~<strong>find / -name filename</strong> : Finds a file or a directory by its name starting from</p><p>~<strong>root file filename</strong> : Determines the file type</p><p>~<strong>less filename</strong> : Views the file content page by page</p><p>~ <strong>head filename</strong> : Views the first ten lines of a file</p><p>~<strong>tail filename</strong> : Views the last ten lines of a file</p><p>~<strong>1sof</strong> : Shows which files are opened by which process.</p><p>~<strong>du -h — max-depth=1</strong> : Shows the size of each directory. Use — max-depth=1 to limit the output to the current directory and its immediate children.</p><p>~<strong>fdisk </strong>: Disk partition manipulation command.</p><h3><strong>2. Directory Operations:</strong></h3><p>~ <strong>mkdir directoryname</strong>: Creates a new directory in the present working directory</p><p>~<strong>rmdir directoryname</strong>: Deletes a directory</p><p>~<strong>cp -r source destination</strong>: Copies directories recursively</p><p>~<strong>mv olddir newdir</strong>: Renames directories</p><p>~<strong>find-type d-name directoryname</strong>: Finds a directory starting from root</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*KpyPldVdbP6db1Dsc88KqQ.png" /></figure><h3><strong>3. Process Operations:</strong></h3><p>~<strong>ps</strong>: Displays your currently active processes.</p><p>~<strong>top</strong>: Displays all running processes</p><p>~<strong>kill pid</strong>: Kills the process with given pid</p><p>~<strong>pkill name</strong>: Kills the process with the given name</p><p>~ <strong>bg</strong>: Resumes suspended jobs without bringing them to foreground</p><p>~<strong>fg</strong>: Brings the most recent job to foreground</p><p>~<strong>fg n</strong>: Brings job n to the foreground renice</p><p>~<strong>+n [pid]</strong>: Change the priority of a running process.</p><p><strong>~&amp;&gt;filename</strong>: Redirects both the stdout and the stderr to the file filename.</p><p>~<strong>1&gt;filename</strong>: Redirect the stdout to file filename.</p><p>~<strong>2&gt;filename</strong>: Redirect stderr to file filename</p><h3><strong>4. File Permissions:</strong></h3><p>~<strong>chmod octal filename</strong>: Change the permissions of file to octal, which can be between 0 (no permissions) to 7 (full permissions)</p><p>~<strong>chown ownername filename</strong>: Change file owner</p><p>~<strong>chgrp groupname filename</strong>: Change group owner</p><h3><strong>5.Networking:</strong></h3><p>~<strong>ping host</strong>: Ping a host and outputs results</p><p>~ <strong>whois domain</strong>: Get whois information for domain</p><p>~<strong>dig domain:</strong> Get DNS information for domain</p><p>~ <strong>netstat -pnltu</strong>: Display various network related information such as network connections, routing tables, interface statistics etc.</p><p>~<strong>ifconfig</strong>: Displays IP addresses of all network interfaces</p><p>~<strong>ssh user@host</strong>: Remote login into the host as user</p><p>~<strong>scp</strong>: Transfers files between hosts over ssh</p><p>~ <strong>wget url</strong>: Download files from the web</p><p>~<strong>curl url:</strong> Sends a request to a URL and returns the response</p><p>~<strong>traceroute domain</strong>: Prints the route that a packet takes to reach the domain.</p><p>~ <strong>mtr domain</strong>: mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.</p><p>~<strong>ss</strong>: Another utility to investigate sockets. It’s a more modern alternative to netstat.</p><p>~<strong>nmap</strong>: Network exploration tool and security scanner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*mxqfxeJdmDTRE9KvUN_dHg.png" /></figure><h3><strong>6. Archives and Compression:</strong></h3><p>~<strong>tar cf file.tar files</strong>: Create a tar named file. tar containing files</p><p>~<strong>tar xf file.tar</strong>: Extract the files from file.tar</p><p>~ <strong>gzip file</strong>: Compresses file and renames it to file.gz</p><p>~ <strong>gzip d file.gz</strong>: Decompresses file.gz back to file</p><p>~<strong>zip -r file.zip files</strong>: Create a zip archive named file.zip</p><p>~<strong>unzip file.zip</strong>: Extract the contents of a zip file</p><h3><strong>7. Text Processing:</strong></h3><p>~<strong>grep pattern files</strong>:Search for pattern in files</p><p>~<strong> grep -r pattern dir</strong>: Search recursively for pattern in dir</p><p>~<strong>command | grep pattern</strong>: Pipe the output of command to grep for searching</p><p>~<strong>echo ‘text’</strong>: Prints text</p><p>~<strong>sed ‘s/string/string2/g’ filename</strong>: Replaces string1 with string2 in filename</p><p>~<strong>diff file1 file2</strong>: Compares two files and shows the differences</p><p>~<strong>wc filename</strong>: Count lines, words, and characters in a file</p><p>~<strong>awk</strong>: A versatile programming language for working on files</p><p>~ <strong>sed -i ‘s/string1/string2/g’ filename</strong>: Replace string1 with string2 in filename. The -i option edits the file in-place.</p><p>~<strong>cut -d’: -f1 /etc/passwd:</strong> Cut out the first field of each line in /etc/passwd, using colon as a field delimiter</p><h3><strong>8. Disk Usage:</strong></h3><p>~<strong>df</strong>: Shows disk usage</p><p>~ <strong>du</strong>: Shows directory space usage</p><p>~ <strong>free</strong>: Show memory and swap usage</p><p>~<strong>whereis</strong> <strong>app</strong>: Show possible locations of app</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*gTFvxoZp7FnSZOWmrYixBw.jpeg" /></figure><h3><strong>9. System Info:</strong></h3><p>~<strong>date</strong>: Show the current date and time</p><p>~<strong>cal</strong>: Show this month’s calendar</p><p>~<strong>uptime</strong>: Show current uptime</p><p>~<strong>w</strong>: Display who is online.</p><p>~<strong>whoami</strong>: Who you are logged in as</p><p>~<strong>uname</strong> -a: Show kernel information</p><p>~<strong>df -h</strong>: Disk usage in human readable format</p><p>~<strong>du -sh</strong>: Disk usage of current directory in human readable format</p><p>~ <strong>free -m</strong>: Show free and used memory in MB</p><h3><strong>10. Package Installations:</strong></h3><p>~<strong>sudo apt-get update</strong>: Updates package lists for upgrades</p><p>~<strong>sudo apt-get upgrade</strong>: Upgrades all upgradable packages</p><p>~<strong>sudo apt-get install pkgname</strong>: Install pkgname</p><p>~<strong>sudo apt-get remove pkgname</strong>: Removes pkgname</p><h3><strong>11. Others (mostly used in scripts):</strong></h3><p><strong>~command1 command2</strong>: Run command1 and then command2</p><p>~<strong>command1 &amp;&amp; command2</strong>: Run command2 if command1 is successful</p><p>~<strong>command1 || command2:</strong> Run command2 if command1 is not successful</p><p>~<strong>command &amp;</strong>: Run command in background</p><h3><strong>12. Version Control (Git commands):</strong></h3><p>~<strong> git init</strong>: Initialize a local git repository</p><p>~<strong> git clone url</strong>: Create a local copy of a remote repository</p><p>~<strong>git add filename</strong>: Add a file to the staging area</p><p><strong>~git commit -m “Commit message”</strong>: Commit changes with a message</p><p>~ <strong>git status</strong>: Check the status of the working directory</p><p>~<strong>git pull</strong>: Pull latest changes from the remote repository</p><p>~<strong>git push</strong>: Push changes to the remote repository</p><p>~<strong>git branch</strong>: List all local branches</p><p>~<strong>git branch branchname</strong>: Create a new branch</p><p>~<strong>git checkout branchname</strong>: Switch to a branch</p><p>~<strong>git merge branchname</strong>: Merge a branch into the active branch</p><p>~<strong>git stash</strong>: Stash changes in a dirty working directory</p><p>~<strong>git stash apply</strong>: Apply changes from a stash</p><p>~<strong>git log</strong>: View commit history</p><p>~<strong>git reset</strong>: Reset your HEAD pointer to a previous commit</p><p>~<strong>git rm filename</strong>: Remove a file from version control</p><p>~<strong>git rebase</strong>: Reapply commits on top of another base tip.</p><p><strong>~git revert</strong>: Create a new commit that undoes all of the changes made in a particular commit, then apply it to the current branch.</p><p>~<strong>git cherry</strong>-pick commitID: Apply the changes introduced by some existing commits.</p><h3><strong>13. Environment Variables:</strong></h3><p>~<strong>env</strong>: Display all environment variables</p><p>~<strong>echo $VARIABLE</strong>: Display the value of an environment variable</p><p>~<strong>export VARIABLE</strong>=value: Set the value of an environment variable</p><p>~<strong>alias new_command=”old_command options</strong>: Create a new command that executes the old command with the specified options.</p><p>~<strong>echo $PATH</strong>: Print the PATH environment variable.</p><p>~<strong>export PATH=$PATH:/new/path</strong>: Add /new/path to the PATH.</p><h3><strong>14. Job Scheduling (Cron Jobs):</strong></h3><p>~<strong>crontab -1</strong>: List all your cron jobs</p><p>~<strong>crontab -e</strong>: Edit your cron jobs</p><p>~<strong>crontab -r</strong>: Remove all your cron jobs</p><p>~ <strong>crontab -v</strong>: Display the last time you edited your cron jobs</p><p>~<strong>crontab file</strong>: Install a cron job from a file</p><p><strong>~@reboot command</strong>: Schedule a job to run at startup</p><h3><strong>15. Package Installations (using pip, a Python package installer):</strong></h3><p>~<strong>pip install packagename</strong>: Install a Python package.</p><p>~<strong>pip uninstall packagename</strong>: Uninstall a Python package.</p><p>~<strong>pip freeze &gt; requirements.txt</strong>: Freeze the installed packages into a requirements file.</p><p>~ <strong>pip install -r requirements.txt</strong>: Install packages from a requirements file.</p><h3><strong>16. System Monitoring and Performance:</strong></h3><p><strong>~iostat</strong>: Reports Central Processing Unit (CPU) statistics and input/output statistics for devices, partitions, and network filesystems.</p><p>~<strong>vmstat</strong>: Reports information about processes, memory, paging, block 10, traps, disks, and CPU activity.</p><p>~<strong>htop</strong>: An interactive process viewer for Unix systems. It’s a more user-friendly alternative to top.</p><h3><strong>17. Search and Find:</strong></h3><p>~<strong> locate filename</strong>: Find a file by its name. The database updated by updatedb command.</p><p>~ <strong>whereis programname</strong>: Locate the binary, source, and manual page files for a command.</p><p>~<strong>which commandname</strong>: Shows the full path of (shell) commands.</p><h3><strong>18. Compression / Archives:</strong></h3><p>~<strong> tar -cvf archive.tar dirname/</strong>: Create a tar archive.</p><p>~<strong>tar -xvf archive.tar</strong>: Extract a tar archive.</p><p>~<strong>tar -jcvf archive.tar.bz2 dirname/</strong>: Create a compressed bz2 archive.</p><p>~<strong>tar -jxvf archive.tar.bz2</strong>: Extract a bz2 archive.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4330cbdde020" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nmap an information gathering tool]]></title>
            <link>https://medium.com/@shiblysadik/nmap-an-information-gathering-tool-958a6cd2196d?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/958a6cd2196d</guid>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[information-gathering]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Sat, 23 Dec 2023 15:43:50 GMT</pubDate>
            <atom:updated>2023-12-23T15:43:50.555Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Nmap?</h3><p>Nmap is short for Network Mapper. It is an open-source Linux command-line tool that is used to scan IP addresses and ports in a network and to detect installed applications.</p><p>Nmap allows network admins to find which devices are running on their network, discover open ports and services, and detect vulnerabilities.</p><p>Nmap has become hugely popular, being featured in movies like The Matrix and the popular series Mr. Robot.</p><h3>Why use Nmap?</h3><p>There are a number of reasons why security pros prefer Nmap over other scanning tools.</p><p>First, Nmap helps you to quickly map out a network without sophisticated commands or configurations. It also supports simple commands (for example, to check if a host is up) and complex scripting through the Nmap scripting engine.</p><p>Other features of Nmap include:</p><ul><li>Ability to quickly recognize all the devices including servers, routers, switches, mobile devices, etc on single or multiple networks.</li><li>Helps identify services running on a system including web servers, DNS servers, and other common applications. Nmap can also detect application versions with reasonable accuracy to help detect existing vulnerabilities.</li><li>Nmap can find information about the operating system running on devices. It can provide detailed information like OS versions, making it easier to plan additional approaches during penetration testing.</li><li>During security auditing and vulnerability scanning, you can use Nmap to attack systems using existing scripts from the Nmap Scripting Engine.</li><li>Nmap has a graphical user interface called Zenmap. It helps you develop visual mappings of a network for better usability and reporting.</li></ul><h3>Basic scans</h3><p>Scanning the list of active devices on a network is the first step in network mapping. There are two types of scans you can use for that:</p><ul><li><strong>Ping scan — </strong>Scans the list of devices up and running on a given subnet.</li></ul><pre>nmap -sP 103.60.173.170</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*VhPcxAVmmxQ6gtnectjE8w.png" /></figure><p><strong>Scan a single host — </strong>Scans a single host for 1000 well-known ports. These ports are the ones used by popular services like SQL, SNTP, apache, and others.</p><pre>nmap  103.60.173.170 </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*-xZA7xT1f4PhAN2KpUpBWA.png" /></figure><h3>Stealth scan</h3><p>Stealth scanning is performed by sending an SYN packet and analyzing the response. If SYN/ACK is received, it means the port is open, and you can open a TCP connection.</p><p>However, a stealth scan never completes the 3-way handshake, which makes it hard for the target to determine the scanning system.</p><pre>sudo nmap 130.60.173.170</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*RqHc4AUQ-y2HuZDbk-AAPQ.png" /></figure><p>You can use the <strong>‘-sS’</strong> command to perform a stealth scan. Remember, stealth scanning is slower and not as aggressive as the other types of scanning, so you might have to wait a while to get a response.</p><h3>Version scanning</h3><p>Finding application versions is a crucial part in penetration testing.</p><p>It makes your life easier since you can find an existing vulnerability from the <a href="https://cve.mitre.org/">Common Vulnerabilities and Exploits (CVE)</a> database for a particular version of the service. You can then use it to attack a machine using an exploitation tool like <a href="https://en.wikipedia.org/wiki/Metasploit_Project">Metasploit</a>.</p><pre>nmap -sV 103.60.173.170</pre><p>To do a version scan, use the ‘-sV’ command. Nmap will provide a list of services with its versions. Do keep in mind that version scans are not always 100% accurate, but it does take you one step closer to successfully getting into a system.</p><h3>Aggressive Scanning</h3><p>Nmap has an aggressive mode that enables OS detection, version detection, script scanning, and traceroute. You can use the -A argument to perform an aggressive scan.</p><pre>nmap -A 103</pre><p>Aggressive scans provide far better information than regular scans. However, an aggressive scan also sends out more probes, and it is more likely to be detected during security audits.</p><h3>Scanning Multiple Hosts</h3><p>Nmap has the capability of scanning multiple hosts simultaneously. This feature comes in real handy when you are managing vast network infrastructure.</p><p>You can scan multiple hosts through numerous approaches:</p><ul><li>Write all the IP addresses in a single row to scan all of the hosts at the same time.</li></ul><pre>nmap 192.164.1.1 192.164.0.2 192.164.0.2</pre><ul><li>Use the asterisk (*) to scan all of the subnets at once.</li></ul><pre>nmap 192.164.1.*</pre><p>Add commas to separate the addresses endings instead of typing the entire domains.</p><pre>nmap 192.164.0.1,2,3,4</pre><p>Use a hyphen to specify a range of IP addresses</p><pre>nmap 192.164.0.0–255</pre><h3>Conclusion</h3><p>Nmap is clearly the “Swiss Army Knife” of networking, thanks to its inventory of versatile commands.</p><p>It lets you quickly scan and discover essential information about your network, hosts, ports, firewalls, and operating systems.</p><p>Nmap has numerous settings, flags, and preferences that help system administrators analyze a network in detail.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=958a6cd2196d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implement VNC Technique]]></title>
            <link>https://medium.com/@shiblysadik/implement-vnc-technique-c0a45089d8de?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0a45089d8de</guid>
            <category><![CDATA[tightvnc]]></category>
            <category><![CDATA[vnc-viewer]]></category>
            <category><![CDATA[vnc]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Sun, 03 Dec 2023 20:08:15 GMT</pubDate>
            <atom:updated>2023-12-03T20:08:15.328Z</atom:updated>
            <content:encoded><![CDATA[<p>Implementing VNC (Virtual Network Computing) involves setting up a server on the host (Kali Linux in this case) and a client on the guest (Windows in the virtual machine). Here are the general steps to achieve this using the popular VNC server and client, TightVNC:</p><h3>On Kali Linux (Host):</h3><ol><li><strong>Install TightVNC Server:</strong></li></ol><pre>$sudo apt-get update<br>$sudo apt-get install tightvncserver</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*_e_MNXMGHUBE69leDRIysg.png" /><figcaption>Try this for Innstall</figcaption></figure><p><strong>2. Start the VNC server :</strong></p><pre>$tightvncserver</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*w929PtD8H8uFcUhzPye2tw.png" /><figcaption>VNC server is ready</figcaption></figure><ul><li>You’ll be prompted to set a password for VNC access.</li></ul><p><strong>3.Configure VNC to Start at Boot (Optional):</strong></p><pre>$tightvncserver -service install<br>$tightvncserver -service start</pre><h3>On Windows (Virtual Machine):</h3><ol><li><strong>Download and Install TightVNC Viewer:</strong> Download the installer from the <a href="https://www.tightvnc.com/download.php">official TightVNC website</a> and install it on your Windows virtual machine.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JtrVTXheBk_0-BUv9a8YjQ.png" /></figure><ol><li><strong>Connect to Kali Linux (Host):</strong> Open TightVNC Viewer on your Windows machine and enter the IP address of your Kali Linux host, followed by the port number. The default VNC port is 5901, but it can be different if you started the server on a different display. For example</li></ol><pre>&lt;Kali_IP_Address&gt;:5901</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EGIOj6xdHO4mKHRe45W7Ww.png" /></figure><p>Enter the VNC password you set earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wnj0KPWU3Vd1MDRVTmdaA.png" /></figure><ol><li><strong>Access Kali Linux Desktop:</strong> Once connected, you should see the Kali Linux desktop on your Windows machine.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQrn5ChQ3Xq8KpVvwzMzZA.png" /><figcaption>Because of security reason screen is blank.</figcaption></figure><h3>Note:</h3><ul><li>Ensure that your Kali Linux firewall allows VNC traffic (port 5901 by default).</li><li>Adjust the resolution and display settings when starting the VNC server if needed.</li><li>Be cautious about security; using VNC over a secure network is recommended, or use SSH tunnels for encryption.</li><li>Always keep your software up to date, including the VNC server and viewer.</li></ul><p>Remember, using remote access tools comes with security implications, and it’s crucial to secure your system appropriately, especially when working with penetration testing tools like Kali Linux. Always use such tools responsibly and in accordance with applicable laws and policies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0a45089d8de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Cyber Security]]></title>
            <link>https://medium.com/@shiblysadik/introduction-to-cyber-security-1fe617e8e403?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fe617e8e403</guid>
            <category><![CDATA[cia]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Wed, 29 Nov 2023 19:03:34 GMT</pubDate>
            <atom:updated>2023-11-29T19:03:34.709Z</atom:updated>
            <content:encoded><![CDATA[<p>what is cyber security?</p><p>As we become increasingly connected through the Internet by access through the computer, our phones, and even household devices, security has become a hot topic. Attacks can happen from any corner. What happens if someone gains control of your computer or phone? Or someone gains control of just your Google account?</p><p>On an enterprise level, attacks on computer systems can also breach millions of pieces of personal data, including credit card information. Governments are also vulnerable to attacks that expose sensitive data.</p><p>Cybersecurity involves everyone and every entity — from you and your neighbors, to organizations, to companies, to governments.</p><p>The Internet has completely revolutionized the way we communicate with each other and share information. Many of us spend hours on social media and online group chats. Nearly all institutions have some sort of computer system administration to keep track of accounts, and buying and selling things on the Internet is now the norm. One by one, even medical equipment, transportation systems, and vacuums are connected to the web.</p><h3>What is Cybersecurity, exactly?</h3><p>There’s no turning back, even as more connections to the Internet lead to more privacy concerns and security risks. We don’t want strangers to access our accounts, or our credit card numbers. Along with practicing personal security, organizations and businesses also need to do their part to implement the right protections.</p><p><em>Cybersecurity</em> is the field of study and practice that responds to these challenges as technology evolves. In a formal definition by CISCO:</p><blockquote><em>“Cybersecurity is the practice of protecting systems, networks, and programs from digital attacks.”</em></blockquote><p>Digital attacks can cover a whole range from fraudulent emails to a targeted shutdown of a website’s traffic. Defenses against these attacks, then, must be learned and implemented at all levels.</p><h3>The CIA Triad</h3><p>A basic, overarching model for cybersecurity, particularly as it relates to information, is the <a href="https://www.forcepoint.com/cyber-edu/cia-triad">CIA Triad</a>. CIA stands for Confidentiality, Integrity, and Availability (not the US Central Intelligence Agency). Nearly all information security policies trace back to this model. Let’s go through each component of this triad.</p><h4>Confidentiality</h4><p>This pillar of the triad refers to protecting private information from eyes that shouldn’t have access to it. Confidentiality is the need to enforce access — who can see this, and who shouldn’t? For example, we don’t want to give our social security number to just anyone, but we trust that the institutions we give them to — like tax services — implement the right security measures to keep it secret. So what tools are used to guarantee the right access?</p><p>Some of the ways confidentiality is managed are:</p><ul><li>Keeping levels of access and setting permissions</li><li>Encrypting data and files</li><li>Requiring multi-factor authentication</li></ul><h4>Integrity</h4><p>Integrity refers to data integrity here. We need security controls that protect data from being changed or deleted. We must also ensure that the damage can be reversed if data was changed accidentally or by the wrong person. Some techniques related to integrity are:</p><ul><li>Keeping backups of the data in its correct state, and logging versions</li><li>Using cryptography to securely check for changes</li><li>Keeping track of digital signatures to prove integrity of data</li></ul><h4>Availability</h4><p>This last pillar refers to data being consistently, reliably available to those authorized. For example, when you login to a social media account and want to set your privacy settings, you expect all the correct settings you had set before to appear immediately. The social media company ensures that even with high traffic, information gets to your screen. How is this accomplished?</p><ul><li>Always monitoring servers and networks</li><li>Maintaining hardware and software</li><li>Having a plan for disaster recovery</li></ul><h3>The Cybersecurity Industry</h3><p>In this article, we will break down common domains in cybersecurity.</p><p>Cybersecurity is becoming a broader field as more industries migrate onto the Internet and become a part of the digital landscape. That means there are cybersecurity needs in nearly every industry in addition to cybersecurity being an industry itself. Security roles are no longer just the hacker stereotype of cracking into systems and writing code all the time; cybersecurity as a whole encompasses many skills that work together.</p><p>In this article, we’ll break down some of the big domains in the cybersecurity industry. There are lots of overlap between different domains and cybersecurity careers, so keep in mind that the domains are not drawn with hard lines, especially as they keep evolving.</p><h3>Security engineering</h3><p>This section refers to the technical implementation of various forms of security.</p><ul><li><a href="https://www.cisco.com/c/en/us/products/security/what-is-information-security-infosec.html">Information security</a>, or InfoSec, protects data in any form from being accessed, modified, shared, or deleted by the wrong people.</li><li><a href="https://www.cisco.com/c/en/us/products/security/what-is-network-security.html?dtid=osscdc000283">Network security</a> is concerned with the network infrastructure of an organization that guards against unauthorized access or data from being intercepted.</li><li><a href="https://www.cisco.com/c/en/us/solutions/security/application-first-security/what-is-application-security.html">Application security</a> refers to implementing measures that defend an application (mobile, desktop, or web) from attack, including both software and hardware solutions. Examples of application security include secure coding, the use of antivirus programs, firewalls, and encryption.</li><li><a href="https://www.mcafee.com/enterprise/en-us/security-awareness/cloud.html">Cloud security</a> refers to the new field of making sure resources uploaded into the cloud are secure. Companies and users are constantly moving more resources into the cloud, and professionals in this field need to be familiar with implementing security in this environment.</li><li><a href="https://www.kaspersky.com/resource-center/definitions/what-is-cryptography">Cryptography</a> focuses on methods to hide and un-hide information so that data is only readable or usable by authorized people. This requires familiarity with all types of encryption and hashing algorithms.</li><li><a href="https://www.forcepoint.com/cyber-edu/critical-infrastructure-protection-cip">Critical infrastructure security</a> is defending physical systems that are becoming more digital/networked, such as energy grids, hospitals, water and waste systems, and even schools. Among the issues that come up are natural disasters and outages.</li></ul><h3>Governance and compliance</h3><p>It’s critical to understand international, federal, and state laws and regulations for security. This has implications on the security operations for all organizations. Compliance refers to making sure an organization enforces certain policies, and continuously auditing as well.</p><p>This is becoming an increasingly important area of work. While these roles might not require programming knowledge, these roles require foundational knowledge of cybersecurity as well as all the laws and regulations that impact a particular industry.</p><h3>Risk management and threat intelligence</h3><p>No system will ever be perfect, and there will always be risk, so this area of work is about managing that risk.</p><p>How is risk managed? Through identifying risks, assessing the likelihood and potential threat of security vulnerabilities, and finding the most cost-effective and efficient security measures.</p><p>Threat intelligence is the continuous gathering of knowledge of possible attacks. Intelligence could look like knowing the motivations behind attacks, what the scale of attacks could be, and what vectors that might use. These roles often intersect with <a href="https://www.codecademy.com/catalog/subject/data-science">data science</a> and machine learning because of the need to process all this information.</p><h3>Security operations</h3><p>People who work in this area are responsible for implementing security principles, monitoring for incidents, and recovering from disasters. They work closely with everyone under the security umbrella to:</p><ul><li>Detect when something has gone wrong.</li><li>Implement preventative measures against cyber attacks.</li><li>Make sure there are back-ups in case a system is compromised and data is lost.</li><li>Track changes to a system.</li><li>Come up with disaster recovery plans in advance</li><li>Create documents and organization policies for all of the above.</li></ul><h3>Education</h3><p>Security education is a growing area in itself! This domain acknowledges that the most securely designed technologies are only as strong as the people who use them. User education teaches best practices for people to protect themselves against cyber threats. Security training also happens in large organizations, where employees are educated and updated on the organization’s security policies and practices.</p><p>This domain can also include the career development and training of new security professionals as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fe617e8e403" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Differentiate SSH and Telnet and implement SSH(secure shell) in the lab]]></title>
            <link>https://medium.com/@shiblysadik/differentiate-ssh-and-telnet-and-implement-ssh-secure-shell-in-the-lab-8d1089b76838?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d1089b76838</guid>
            <category><![CDATA[telnet]]></category>
            <category><![CDATA[openssh-server]]></category>
            <category><![CDATA[openssh]]></category>
            <category><![CDATA[secure-shell]]></category>
            <category><![CDATA[kali-linux]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Mon, 20 Nov 2023 20:29:42 GMT</pubDate>
            <atom:updated>2023-11-20T20:29:42.086Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Abstract </strong>: In this lab we connected windows as a virtual machine and Kali linux as a host machine by using openSSH. In here we know about the SSH and Telnet and stablish secure shell connection.</p><p><strong>Introduction</strong>: The SSH protocol, also known as Secure Shell, is a technique for secure and reliable remote login from one computer to another. It offers several options for strong authentication, as it protects the connections and communications\ security and integrity with strong encryption. It is a secure alternative to the non-protected login protocols (such as telnet, rlogin) and insecure file transfer methods (such as FTP).</p><p><strong>Differentiate Between SSH and TELNET </strong><br><strong>SSH (Secure Shell):</strong></p><ul><li><strong>Security:</strong> SSH provides a secure and encrypted communication channel over an unsecured network (such as the internet).</li><li><strong>Authentication:</strong> Utilizes public-key cryptography, password authentication, or a combination for user authentication.</li><li><strong>Encryption:</strong> Encrypts the entire session, including data transfer and user credentials, ensuring confidentiality.</li><li><strong>Port:</strong> Typically uses port 22 by default.</li><li><strong>Use Case:</strong> Widely used for remote access to servers and network devices with a focus on security.</li></ul><p><strong>Telnet:</strong></p><ul><li><strong>Security:</strong> Telnet transmits data in plain text, making it vulnerable to eavesdropping and interception.</li><li><strong>Authentication:</strong> Uses simple username and password authentication, sending credentials in plain text.</li><li><strong>Encryption:</strong> Lacks encryption, exposing sensitive information during communication.</li><li><strong>Port:</strong> Typically uses port 23 by default.</li><li><strong>Use Case:</strong> Historically used for remote access but now largely replaced by more secure protocols like SSH.</li></ul><p><strong>process:</strong></p><p><strong><em>First we need to ready those device for connection.</em></strong></p><p>Installing OpenSSL on Windows involves downloading the OpenSSL installer and running it. Here are step-by-step instructions:</p><p>To install an SSH server on a Windows machine, you can use the OpenSSH for Windows package. Here are step-by-step instructions:</p><h3>Installing OpenSSH on Windows:</h3><ol><li><strong>Enable OpenSSH Feature:</strong></li></ol><ul><li>Open the “Settings” app on your Windows machine.</li><li>Go to “Apps” &gt; “Optional Features.”</li><li>Scroll down and find “OpenSSH Server.” Click on it.</li><li>Click “Install” to enable the OpenSSH feature.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*skF5kWXfjamTdZVkR9gnmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*x2psfgkGlAwtho04CKFwzg.png" /><figcaption>Step to be followed</figcaption></figure><ol><li><strong>Start the SSH Server Service:</strong></li></ol><ul><li>Open the “Services” application. You can do this by pressing Win + R, typing services.msc, and pressing Enter.</li><li>Find the “OpenSSH SSH Server” service in the list.</li><li>Right-click on it, and select “Start.”</li></ul><ol><li><strong>Configure SSH to Start Automatically:</strong></li></ol><ul><li>Right-click on the “OpenSSH SSH Server” service.</li><li>Select “Properties.”</li><li>In the “Startup type” dropdown, choose “Automatic.” This ensures that the SSH server starts automatically with Windows.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4fOLVFNXKr-962OiXPqMwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6IBPEt2C16bMrymb_fAGeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*x2psfgkGlAwtho04CKFwzg.png" /><figcaption>Following Screen shot 3–2–1</figcaption></figure><p><strong>Now SSH service is ready for your windows machine .. its time to kali linux.</strong></p><p>Kali Linux typically comes with the OpenSSH client pre-installed. If you want to set up an OpenSSH server on Kali Linux, you can follow these steps:</p><h3>Install OpenSSH Server on Kali Linux:</h3><p>Open a terminal on your Kali Linux machine and run the following commands:</p><pre>$sudo apt install openssh-server</pre><p><strong>Start SSH service and Enable this service</strong></p><p>To check this service we use this command :</p><pre>$sudo service ssh status </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*r8c3NbGVdmifbx9GQbO_9A.png" /></figure><p>If the service is Inactive then we use this command line to start service.</p><pre>$sudo service ssh start</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*8acvtnIRPlgjvzuu0UhYeA.png" /></figure><p>after start the service we again check the status of openssh.. Now its running in kali.</p><p>Now The connection Between two Device..</p><p>First we need to know the host machine ip address for ssh connection. To know this here the command.</p><pre>$ifconfig</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrWWwKb4U6xjV6WTmNjtGA.png" /><figcaption>Host machine IP address</figcaption></figure><p>now In windows machine I open cmd for connect the host machine.. and type .</p><pre>&gt;ssh server@192.168.0.148</pre><p>the command description is ..</p><p>ssh &lt;the_host_name&gt;@&lt;the_domain_of_target_machine&gt;</p><p>here the connection</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kYRgr-VxebcHmVVwW9o3vQ.png" /><figcaption>the red for the command and yellow for the other machine cmd</figcaption></figure><p>Now we execute some command in this host machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dllPrHAAeS3HkqQ5hYqJlw.png" /></figure><p>we execute some command in secure shell connection.we can also use ftp,http,tcp protocol in ssh.</p><p>To exit the connection we need to write exit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NI7gTMmglaTuE5_8n9330A.png" /><figcaption>Connection Closed</figcaption></figure><h4>Discussion:</h4><ol><li><strong>Security Enhancement:</strong></li></ol><ul><li>SSH, being a secure protocol, ensures that communication between the client and server is encrypted, reducing the risk of eavesdropping and unauthorized access.</li></ul><p><strong>2.Authentication Mechanisms:</strong></p><ul><li>The use of public-key cryptography and strong password authentication in SSH provides robust user authentication, enhancing the overall security posture.</li></ul><p><strong>3.Confidentiality:</strong></p><ul><li>The encryption of the entire session in SSH ensures the confidentiality of sensitive information, protecting it from potential attackers.</li></ul><p><strong>4.Port Security:</strong></p><ul><li>SSH commonly uses port 22, and by implementing it in the lab, we ensure that the chosen port is open and properly configured for secure communication.</li></ul><h4>Conclusion:</h4><p>Implementing SSH in the lab environment brings several security benefits compared to Telnet. The use of encryption, strong authentication mechanisms, and the overall security architecture of SSH make it a preferred choice for secure remote access.</p><p>By adopting SSH, organizations can mitigate the risks associated with plaintext communication and unauthorized access. The discussion highlights the importance of security protocols in ensuring the confidentiality and integrity of data during remote access scenarios.</p><p>In conclusion, SSH stands out as a more secure and reliable choice for remote access, aligning with modern security standards and best practices. As technology evolves, it becomes imperative to prioritize secure communication methods to safeguard sensitive information in both lab and production environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d1089b76838" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conclusion: In conclusion, the implementation of the web server service establishes a foundational]]></title>
            <link>https://medium.com/@shiblysadik/conclusion-in-conclusion-the-implementation-of-the-web-server-service-establishes-a-foundational-dcb3c6c5b886?source=rss-79235f7f39d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcb3c6c5b886</guid>
            <category><![CDATA[web-server]]></category>
            <category><![CDATA[apache2]]></category>
            <category><![CDATA[intranet]]></category>
            <category><![CDATA[localhost]]></category>
            <dc:creator><![CDATA[Shibly Sadik]]></dc:creator>
            <pubDate>Sun, 19 Nov 2023 17:31:12 GMT</pubDate>
            <atom:updated>2023-11-19T17:31:12.086Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create and Implement web server service in Local host or Intranet.</h3><p><strong>Abstract:</strong> In this implementation we use apache2 server in linux distribution. We run our web server in Local host https://127.0.0.1 Here we use a random web server to implement this intranet site.</p><p><strong>Introduction</strong>: The deployment of a web server service within a local host or intranet environment has become integral to facilitating seamless communication and collaboration among users. Whether for internal corporate networks or personal development environments, establishing a web server allows for the hosting and accessibility of web-based content within a closed network.</p><p>Process: In this section we implement this in a organized way..</p><p>Firstly we need to check our apache2 server status . for this..</p><pre>$sudo systemctl status apache2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*3lB_nKGqewHGtaaiYeTpsw.png" /></figure><p>Here the active status of apache2 is inactive so that we need to start this service</p><pre>$sudo systemctl start apache2</pre><p>Interface like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*cIPwBFZMxGbJmlEGZSstYA.png" /><figcaption>apache2 active</figcaption></figure><p>Now our apache2 server active . Now we go to the web browser and type</p><p><strong>https:/127.0.0.1</strong></p><p>Here is our apache2 default page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XcKnmnSqfJlwEIh4MuO7TA.png" /><figcaption>Local host</figcaption></figure><p>Now in our Intranet server we replace the default page .</p><p>In here we need to find out the apache2 server default pages like index.html, style.css , script.php . after found this we replace those with our web design page..</p><p>usually this is located in <strong>/var/www/html</strong> or /var/hd_docs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*uCn4tpcPLDELKx9MmrLd_g.png" /></figure><p>In my project it was in <strong>/var/www/html</strong> directory.. I replace or edit yellow underline file in these code..</p><p>Index.html</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br><br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot;&gt;<br>    &lt;title&gt;Simple Intranet&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br>    &lt;header&gt;<br>        &lt;h1&gt;Company Intranet&lt;/h1&gt;<br>    &lt;/header&gt;<br><br>    &lt;nav&gt;<br>        &lt;ul&gt;<br>            &lt;li&gt;&lt;a href=&quot;#home&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;#announcements&quot;&gt;Announcements&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;#documents&quot;&gt;Documents&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;#calendar&quot;&gt;Calendar&lt;/a&gt;&lt;/li&gt;<br>        &lt;/ul&gt;<br>    &lt;/nav&gt;<br><br>    &lt;main&gt;<br>        &lt;section id=&quot;home&quot;&gt;<br>            &lt;h2&gt;Welcome to our Intranet!&lt;/h2&gt;<br>            &lt;p&gt;This is a simple intranet site for internal collaboration.&lt;/p&gt;<br>        &lt;/section&gt;<br><br>        &lt;section id=&quot;announcements&quot;&gt;<br>            &lt;h2&gt;Announcements&lt;/h2&gt;<br>            &lt;ul&gt;<br>                &lt;li&gt;&lt;strong&gt;Important Announcement:&lt;/strong&gt; Lorem ipsum dolor sit amet.&lt;/li&gt;<br>                &lt;li&gt;&lt;strong&gt;New Policy:&lt;/strong&gt; Consectetur adipiscing elit.&lt;/li&gt;<br>            &lt;/ul&gt;<br>        &lt;/section&gt;<br><br>        &lt;section id=&quot;documents&quot;&gt;<br>            &lt;h2&gt;Documents&lt;/h2&gt;<br>            &lt;ul&gt;<br>                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Employee Handbook&lt;/a&gt;&lt;/li&gt;<br>                &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Meeting Minutes&lt;/a&gt;&lt;/li&gt;<br>            &lt;/ul&gt;<br>        &lt;/section&gt;<br><br>        &lt;section id=&quot;calendar&quot;&gt;<br>            &lt;h2&gt;Calendar&lt;/h2&gt;<br>            &lt;iframe src=&quot;https://calendar.google.com/calendar/embed?src=yourcalendarid&quot; style=&quot;border: 0&quot;<br>                width=&quot;800&quot; height=&quot;600&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;<br>        &lt;/section&gt;<br>    &lt;/main&gt;<br><br>    &lt;footer&gt;<br>        &lt;p&gt;&amp;copy; 2023 Company Intranet&lt;/p&gt;<br>    &lt;/footer&gt;<br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><p>Style.css</p><pre>body {<br>    font-family: &#39;Arial&#39;, sans-serif;<br>    margin: 0;<br>    padding: 0;<br>}<br><br>header {<br>    background-color: #333;<br>    color: #fff;<br>    text-align: center;<br>    padding: 1em 0;<br>}<br><br>nav {<br>    background-color: #444;<br>    color: #fff;<br>    padding: 0.5em;<br>}<br><br>nav ul {<br>    list-style-type: none;<br>    margin: 0;<br>    padding: 0;<br>    display: flex;<br>    justify-content: space-around;<br>}<br><br>nav a {<br>    color: #fff;<br>    text-decoration: none;<br>}<br><br>main {<br>    padding: 1em;<br>}<br><br>section {<br>    margin-bottom: 2em;<br>}<br><br>footer {<br>    background-color: #333;<br>    color: #fff;<br>    text-align: center;<br>    padding: 1em 0;<br>}</pre><p>I edit these files. I gave permission to execute these like this..</p><pre>$sudo chmod +x index.html<br><br>$sudo chmod +x style.css</pre><p>After this i restart my apache2 server like this..</p><pre>$sudo systemctl restart apache2</pre><p>Now the present intranet webserver look like..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eljv-1KwnDKHyS7aK08THg.png" /><figcaption>Intranet web server</figcaption></figure><p>Now our Intranet server is ready .</p><h3>Discussion:</h3><p>The implementation of the web server service within the local host or intranet environment marks a significant stride towards enhancing internal communication and collaboration. Several key points emerge from the development and deployment of the server, providing insights into its functionality, challenges encountered, and the potential for future improvements.</p><h4>Functionality and User Experience:</h4><p>The web server successfully serves static content, presenting a user-friendly interface accessible through a web browser. The design, consisting of an index.html landing page and a styles.css stylesheet, contributes to a clean and visually appealing user experience. Users can easily navigate through sections such as &quot;Home,&quot; &quot;Announcements,&quot; &quot;Documents,&quot; and &quot;Calendar,&quot; fostering a seamless interaction with the intranet content.</p><h3>Conclusion:</h3><p>In conclusion, the implementation of the web server service establishes a foundational platform for internal collaboration within the local host or intranet environment. The project successfully achieves its primary objectives by providing a straightforward yet effective intranet solution. The integration of HTML and CSS for content presentation, along with the potential for future expansion through server-side scripting, positions the web server to evolve based on organizational needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*cUfB0Iga3mzfH2JAjQeIQQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcb3c6c5b886" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>