IOTSIM is a robust IoT authentication simulator that demonstrates the BasIoT protocol implementation. It provides a comprehensive simulation environment for testing and understanding various IoT security scenarios, including device authentication, secure connections, and potential security threats.
- Legitimate device authentication
- Hacker attempt simulation
- Expired request handling
- Replay attack detection
- Real-time security monitoring
- Device-to-device secure connection simulation
- RSA key pair generation
- Perfect Forward Secrecy with ephemeral keys
- Challenge-response authentication
- Visual key matching verification
- WebSocket-based real-time monitoring
- Authentication metrics tracking
- Security event logging
- Visual representation of system state
- ASCII art animations for connection states
- Color-coded status messages
- Key generation and matching visualization
- Step-by-step process demonstration
- Go 1.19 or later
- Gorilla WebSocket package
- Node.js runtime environment
- Modern terminal with color support
- Clone the repository:
git clone https://github.com/exprays/iotsim.git
cd iotsim
- Install dependencies:
go mod init iotsim
go get github.com/gorilla/websocket
- Build the project:
go build
- Run the simulator:
./iotsim
or you can just run
go run main.go
1.Make sure you have node.js runtime installed in your machine.
2.Navigate to frontend
cd frontend
3.Install dependencies
npm install
4.Run the node dev server
npm run dev
- Legitimate Authentication - Simulate normal device authentication
- Hacker Attempt - Test security against unauthorized access
- Expired Request - Demonstrate timeout handling
- Replay Attack - Show protection against replay attacks
- Device Connection - Simulate secure device-to-device communication
- Exit - Close the simulator
# Start the simulator
go run main.go
# Select option 5 for device connection simulation
5
# Watch the secure connection process:
- Key generation
- Public key exchange
- Challenge-response authentication
- Shared secret establishment
- RSA-2048 key pairs for device identity
- SHA-256 hashing for message integrity
- Timestamp validation
- Nonce-based replay protection
- Digital signatures using PKCS1v15
- Perfect Forward Secrecy
- Ephemeral key generation
- Challenge-response verification
- Secure shared secret establishment
- Key fingerprint visualization
graph TD
A[Device] -->|Authentication Request| B[Authentication Protocol]
B --> C[Blockchain Simulator]
C -->|Verify| D[Resource Holder]
E[Monitor] -->|WebSocket| F[Real-time Updates]
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.md file for details
- Created by exprays (surya)
- Inspired by real-world IoT security challenges
- Built for educational and demonstration purposes
- Creator: exprays
- Email: surya@thestarsociety.tech
- For contribution guidelines and other info: suryakantsubudhi@protonmail.com
- Project Link: https://github.com/exprays/iotsim
This simulator is designed for educational purposes and should not be used as a production security system. While it demonstrates security concepts, it may not implement all necessary security measures for real-world applications. Currently this is in development stage so you can expect bugs🐞!! Email suryakantsubudhi@protonmail.com for bug reports.