Skip to content

Instantly share code, notes, and snippets.

View mshardey's full-sized avatar

Mahmoud Shardey mshardey

View GitHub Profile
@mshardey
mshardey / secure-nextcloud-deployment-on-azure-cloud.md
Last active September 26, 2024 17:46
Secure Nextcloud Deployment on Azure Cloud: A Step-by-Step Guide. Learn how to deploy Nextcloud securely on Azure, leveraging Azure's built-in security features and best practices.
@mshardey
mshardey / incident-handlers-journal.md
Last active September 20, 2024 17:33
Incident Handler's Journal: Documenting security incidents, analysis, and lessons learned.

Incident Handler's Journal

This journal documents my experience handling various security incidents, analysing suspicious activities, and reflecting on lessons learned. The entries below outline the incidents, tools used, and key takeaways.

Date: January 28, 2024 Entry: #1
@mshardey
mshardey / analyse-a-vulnerable-system-for-an-e-commerce-company.md
Last active September 19, 2024 18:37
Conduct a thorough vulnerability assessment for an e-commerce company. Identify risks, develop remediation plans.

Performed a thorough vulnerability assessment to identify and mitigate potential threats to an e-commerce company's information system. Developed a remediation plan to proactively prevent attacks and ensure the organisation's security.

Vulnerability Assessment Report

23rd January 2024

Table of contents

System Description

@mshardey
mshardey / apply-filters-to-sql-queries-enhancing-system-security.md
Last active September 20, 2024 17:11
SQL filtering examples for security-related tasks.

As part of our organisation's ongoing efforts to bolster system security, I led initiatives to identify and mitigate potential vulnerabilities. This involved conducting thorough security audits, addressing emerging threats, and optimising employee workstation configurations.

Introduction to SQL for Security

SQL (Structured Query Language) plays a vital role in security-related tasks by enabling precise data filtering and analysis. In this project, I demonstrate how SQL filters can be applied to streamline security tasks, ensuring the integrity and confidentiality of our systems.

SQL Basics

Before diving into filtering, let's review basic SQL concepts:

@mshardey
mshardey / least-privilege-access-linux-file-permission-configuration.md
Last active September 21, 2024 05:45
Linux File Permissions: Enforcing least privilege access for enhanced security, reducing vulnerabilities and improving system integrity.

This project enhances Linux system security by optimising file permissions, ensuring least privilege access. Key updates include permission adjustments for sensitive files and directories, aligning with organisational policies.

Analysing File and Directory Permissions

The following screenshot demonstrates how to use Linux commands to verify current permissions for a specific directory.

Bash shell output from Kali Linux Verifying file and directory permissions using ls -la command in Linux.

The initial line in the screenshot displays the command entered, while the subsequent lines show the output. This code lists all items in the projects directory. We used the ls command with the -la option to display a detailed list of file contents. This option shows:

@mshardey
mshardey / incident-report-analysis.md
Last active September 20, 2024 00:19
Incident Report Analysis: Leveraging NIST CSF for effective cybersecurity risk management.

Applied the National Institute of Standards and Technology's Cybersecurity Framework (NIST CSF) to investigate a network incident. The resulting incident report provides actionable insights, aligned with NIST CSF's best practices for identifying, protecting, detecting, responding to, and recovering from cybersecurity threats.

Incident Report Analysis

Summary The company encountered a security incident when every network service abruptly ceased its operation. Investigation by the cybersecurity team unveiled that the disturbance stemmed from a distributed denial of service (DDoS) onslaught, inundating the network with a barrage of ICMP packets. In swift response, the team thwarted the attack and halted all non-essential network services, prioritising the restoration of critical network functions.
@mshardey
mshardey / security-risk-assessment-report.md
Last active September 20, 2024 00:13
Security Risk Assessment: Mitigating data breach risks with network hardening.

Conducted a comprehensive security risk assessment following a data breach at a social media company. Identified critical vulnerabilities, recommended network hardening tools, and proposed tailored hardening methods to mitigate risks and prevent future breaches.

Security Risk Assessment Report

Part 1: Three hardening tools and methods to implement
Envisaging robust measures to fortify the organisation's security posture, three potent tools emerge as key elements to address identified vulnerabilities: Instating Multi-Factor Authentication (MFA)Formulating and rigorously enforcing robust password policiesConducting routine firewall maintenance Multi-Factor Authentication (MFA) necessitates users to authenticate their credentials through multiple verification methods before gaining access to an application. Diverse MFA methods, ranging from finge
@mshardey
mshardey / security-incident-report.md
Last active September 20, 2024 00:04
Website Security Incident Report: Investigation, resolution, and prevention.

Conducted a thorough investigation into a website security incident, leveraging tcpdump and DNS/HTTP traffic log analysis. Successfully identified the attack vector, documented the incident timeline, and recommended a security enhancement to prevent future brute-force attacks.

Security Incident Report

Part 1: The network protocol involved in the incident
The network protocol implicated in the incident is the Hypertext Transfer Protocol (HTTP). Through the utilisation of tcpdump, coupled with an investigation into the yummyrecipesforme.com website to pinpoint and capture the problematic elements, the protocol, and traffic activities were meticulously logged in a dedicated DNS & HTTP traffic file. This comprehensive analysis yielded the conclusive evidence necessary to determine that the malevolent file was being conveyed to users' computers via the
@mshardey
mshardey / cybersecurity-incident-report-analyse-network-attacks.md
Last active September 19, 2024 23:57
Analyse Network Attacks: Investigate website disruptions, identify attack vectors.

Investigated and analysed a network attack that disrupted website accessibility, identifying the attack vector and its impact. Provided a comprehensive incident report detailing the attack's methodology and effects.

Cybersecurity Incident Report: Analyse Network Attacks

Part 1: The type of attack that may have caused this network interruption
The website's connection timeout error could be attributed to a potential Denial of Service (DoS) attack. Analysis of the logs reveals that the web server ceases to respond when inundated with an excessive number of SYN packet requests. This incident aligns with a specific type of DoS attack known as SYN flooding.
Part 2: How the attack is causing the website malfunction
@mshardey
mshardey / cybersecurity-incident-report-network-traffic-analysis.md
Last active September 19, 2024 23:49
Cybersecurity Incident Report: Network Traffic Analysis using tcpdump.

Conducted a comprehensive network traffic analysis using tcpdump to investigate a cybersecurity incident. Identified the specific network protocol utilized during the incident, providing valuable insights into the attack vector.

Part 1: Summary of the problem found in the DNS and ICMP traffic log
The network analysis points to a DNS server issue, with the UDP protocol indicating its unavailability. The ICMP echo reply specifically notes "udp port 53 unreachable," which is the standard port for DNS traffic. This strongly suggests a non-responsive DNS server as the probable cause of the problem
Part 2: Clarification of the data analysis and identification of the incident's root cause.
At 1:23 p.m., customers reported receiving a "destination port unreachable" message when attempting to visit the website, prompting the IT team's attention. Currently under