A Python-based text messaging chat application designed as a beginner's playground for offensive security learning. This application demonstrates network communication concepts through detailed OSI layer analysis while providing end-to-end encrypted messaging between clients.
This project serves as an educational tool for beginners in offensive security to understand:
- Network communication protocols and the OSI model
- End-to-end encryption implementation and analysis
- Client-server architecture vulnerabilities
- Real-time network traffic analysis
- Process management and system monitoring
- Python 3.7+
- Required packages:
psutil>=5.9.0
# Clone the repository
git clone https://github.com/disWhat/SimpleChatApp.git
cd chatApp
# Install dependencies
pip install -r requirements.txt
# Start the complete application (server + 2 clients)
python main.pyThis will automatically:
- Start a TCP server on port 8888
- Launch two client GUI windows
- Begin real-time OSI layer analysis
- Enable end-to-end encryption by default
- TCP Server: Routes messages between clients (port 8888)
- GUI Clients: Dracula-themed interface with chat and analysis tabs
- OSI Analysis: Real-time tracking through all 7 network layers
- E2E Encryption: XOR + Base64 encryption with toggle controls
- System Monitoring: CPU, memory, and network statistics via psutil
- End-to-end encryption (server cannot decrypt messages)
- Encryption status synchronization between clients
- Real-time encryption analysis in OSI layer display
- Process isolation and cleanup mechanisms
- Network Analysis: Understand how messages flow through OSI layers
- Encryption Understanding: Learn basic encryption/decryption concepts
- Process Management: See how applications manage system resources
- Traffic Analysis: Real-time monitoring of network communications
- Vulnerability Research: Analyze client-server communication patterns
- Layer-by-layer packet analysis simulation
- Encryption algorithm detection and analysis
- System resource monitoring during communications
- Network interface statistics tracking
- Process and connection management
# Start server only
python app/server.py
# Start individual client
python app/client.py ClientName# Test encryption functionality
python tests/test_encryption.py
# Test live encryption with server
python tests/test_live_encryption.py
# Test encryption status features
python tests/test_encryption_status.py# Kill all chat processes
pkill -f "python.*server.py"
pkill -f "python.*client.py"
# Check port usage
lsof -i :8888
# Monitor system processes
ps aux | grep pythonClient1 ←→ Server ←→ Client2
↓ ↓ ↓
Analysis Analysis Analysis
↓ ↓ ↓
Logs/ Console Logs/
- Communication: Point-to-point messaging through TCP server
- Encryption: Shared key XOR encryption with Base64 encoding
- Analysis: Real-time OSI layer tracking with detailed logging
- GUI: Tabbed interface with chat and analysis views
chatApp/
├── main.py # Application entry point
├── app/
│ ├── server.py # TCP server implementation
│ └── client.py # GUI client with analysis
├── utils/
│ ├── analyze.py # OSI layer analysis engine
│ └── decryptedMsg.py # End-to-end encryption
├── tests/ # Test scripts for all components
├── logs/ # Auto-generated analysis logs
└── requirements.txt # Dependencies
This is an educational tool for learning purposes:
- Uses basic XOR encryption (not production-grade)
- No authentication or authorization mechanisms
- Designed for local network testing only
- Process cleanup may require manual intervention
After working with this application, beginners should understand:
- How network protocols work at different OSI layers
- Basic encryption/decryption concepts and implementation
- Client-server communication patterns
- Network traffic analysis techniques
- System resource monitoring and process management
This project is designed for educational purposes. Feel free to:
- Extend the analysis capabilities
- Add new encryption algorithms
- Improve the GUI interface
- Create additional test scenarios
- Document security findings
This application is intended for educational purposes only. Use responsibly and only on networks you own or have explicit permission to test.