Skip to content

A Simple C program showing a buffer overflow vulnerability

Notifications You must be signed in to change notification settings

RUTHRAN-SEC/Offensive-Code-Labs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Offensive Code Labs

Overview

Offensive Code Labs is a hands on cybersecurity repository designed to demonstrate common security vulnerabilities, cryptographic concepts, and defensive security mechanisms through practical code examples.

This repository contains small, focused projects that simulate real-world security flaws and analysis techniques. The goal is to strengthen understanding of both offensive and defensive security concepts by building and testing vulnerable applications in a controlled lab environment.

⚠️ All projects are created strictly for educational and ethical learning purposes.


Repository Contains

1.Buffer Overflow (Binary Exploitation)

Category: Binary Exploitation
Language: C

Demonstrates how improper input handling in C can lead to buffer overflow vulnerabilities.

Key Concepts:

  • Stack memory layout
  • Unsafe functions (scanf("%s"))
  • Memory corruption
  • Undefined behavior
  • Secure input handling

This lab helps understand how low-level memory vulnerabilities occur and why secure coding practices are critical in system-level programming.


2.Caesar Cipher (Cryptography)

Category: Cryptography
Language: Python

Implements the classic Caesar Cipher encryption and decryption technique.

Key Concepts:

  • Basic encryption algorithms
  • Character shifting logic
  • Symmetric encryption fundamentals
  • Brute-force possibilities

This project introduces fundamental cryptographic principles in a simple and understandable way.


3.Password Policy Analyzer (Defensive Security)

Category: Defensive Security
Language: Python

Analyzes password strength based on defined security policies.

Key Concepts:

  • Input validation
  • Password complexity requirements
  • Security policy enforcement
  • Defensive programming

This lab demonstrates how organizations can enforce strong password policies to prevent weak credential attacks.


4.Web Security Labs

Category: Web Application Security
Technologies: PHP / HTML / SQL

This section demonstrates common web vulnerabilities:

• Cross-Site Scripting (XSS)

  • Reflected input vulnerability
  • Script injection risks
  • Importance of output encoding

• SQL Injection

  • Unsanitized query inputs
  • Authentication bypass scenarios
  • Importance of parameterized queries

• PHP Session Attacks

  • Session hijacking concepts
  • Session fixation risks
  • Importance of secure session management

These labs simulate real-world web vulnerabilities to help understand how attackers exploit insecure web applications.


Skills Developed

  • Secure coding practices
  • Vulnerability identification
  • Basic exploit understanding
  • Defensive security implementation
  • Web application security fundamentals
  • Cryptographic logic comprehension

Purpose of This Repository

This repository is intended to:

  • Strengthen practical cybersecurity skills
  • Support penetration testing learning
  • Build foundational exploit knowledge
  • Develop secure coding awareness
  • Serve as a technical portfolio for security learning

Ethical Use Notice

All content in this repository is created for:

  • Educational purposes
  • Cybersecurity training
  • Legal lab environments only

Do not use these techniques on systems without proper authorization.


⚠️ Disclaimer

This project is intended strictly for educational and ethical purposes. All testing must be performed only on systems you own or have explicit authorization to test. The author is not responsible for any misuse or illegal activity resulting from the use of this project.

Author

RUTHRAN-SEC