{"id":21393646,"url":"https://github.com/exprays/iotsim","last_synced_at":"2026-02-16T03:33:15.685Z","repository":{"id":261028452,"uuid":"882991811","full_name":"exprays/iotsim","owner":"exprays","description":"An IoT authentication network that demonstrates the BasIoT protocol.","archived":false,"fork":false,"pushed_at":"2025-03-08T09:08:37.000Z","size":18458,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T09:44:32.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exprays.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-04T07:24:21.000Z","updated_at":"2025-03-08T09:08:41.000Z","dependencies_parsed_at":"2025-01-23T01:40:52.871Z","dependency_job_id":"ffc0ba5a-32cf-4bbf-966f-908ddfc6ef7c","html_url":"https://github.com/exprays/iotsim","commit_stats":null,"previous_names":["exprays/iotsim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/exprays/iotsim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fiotsim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fiotsim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fiotsim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fiotsim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exprays","download_url":"https://codeload.github.com/exprays/iotsim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exprays%2Fiotsim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29499615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T02:07:14.481Z","status":"online","status_checked_at":"2026-02-16T02:03:22.852Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T14:12:49.002Z","updated_at":"2026-02-16T03:33:15.670Z","avatar_url":"https://github.com/exprays.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IOTSIM - Secure IoT Authentication Simulator\n\n## Overview\n\nIOTSIM 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.\n\n## Features\n\n### 1. Authentication Simulation\n- Legitimate device authentication\n- Hacker attempt simulation\n- Expired request handling\n- Replay attack detection\n- Real-time security monitoring\n\n### 2. Secure Device Communication\n- Device-to-device secure connection simulation\n- RSA key pair generation\n- Perfect Forward Secrecy with ephemeral keys\n- Challenge-response authentication\n- Visual key matching verification\n\n### 3. Real-time Monitoring\n- WebSocket-based real-time monitoring\n- Authentication metrics tracking\n- Security event logging\n- Visual representation of system state\n\n### 4. Visualization Features\n- ASCII art animations for connection states\n- Color-coded status messages\n- Key generation and matching visualization\n- Step-by-step process demonstration\n\n## Technical Details\n\n### Requirements\n- Go 1.19 or later\n- Gorilla WebSocket package\n- Node.js runtime environment \n- Modern terminal with color support\n\n### Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/exprays/iotsim.git\ncd iotsim\n```\n\n2. Install dependencies:\n```bash\ngo mod init iotsim\ngo get github.com/gorilla/websocket\n```\n\n3. Build the project:\n```bash\ngo build\n```\n\n4. Run the simulator:\n```bash\n./iotsim\n``` \nor you can just run\n```bash\ngo run main.go\n```\n\n### Starting the monitor dashboard\n\n1.Make sure you have node.js runtime installed in your machine.\n\n2.Navigate to frontend\n```bash\ncd frontend\n```\n\n3.Install dependencies\n```bash\nnpm install\n```\n\n4.Run the node dev server\n```bash\nnpm run dev\n```\n\n## Usage\n\n### Main Menu Options\n1. **Legitimate Authentication** - Simulate normal device authentication\n2. **Hacker Attempt** - Test security against unauthorized access\n3. **Expired Request** - Demonstrate timeout handling\n4. **Replay Attack** - Show protection against replay attacks\n5. **Device Connection** - Simulate secure device-to-device communication\n6. **Exit** - Close the simulator\n\n### Example Simulation\n\n```bash\n# Start the simulator\ngo run main.go\n\n# Select option 5 for device connection simulation\n5\n\n# Watch the secure connection process:\n- Key generation\n- Public key exchange\n- Challenge-response authentication\n- Shared secret establishment\n```\n\n## Security Features\n\n### Authentication Protocol\n- RSA-2048 key pairs for device identity\n- SHA-256 hashing for message integrity\n- Timestamp validation\n- Nonce-based replay protection\n- Digital signatures using PKCS1v15\n\n### Device Connection Security\n- Perfect Forward Secrecy\n- Ephemeral key generation\n- Challenge-response verification\n- Secure shared secret establishment\n- Key fingerprint visualization\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[Device] --\u003e|Authentication Request| B[Authentication Protocol]\n    B --\u003e C[Blockchain Simulator]\n    C --\u003e|Verify| D[Resource Holder]\n    E[Monitor] --\u003e|WebSocket| F[Real-time Updates]\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Acknowledgments\n\n- Created by exprays (surya)\n- Inspired by real-world IoT security challenges\n- Built for educational and demonstration purposes\n\n## Contact\n\n- Creator: exprays\n- Email: surya@thestarsociety.tech\n- For contribution guidelines and other info: suryakantsubudhi@protonmail.com\n- Project Link: https://github.com/exprays/iotsim\n\n## Disclaimer\n\nThis 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexprays%2Fiotsim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexprays%2Fiotsim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexprays%2Fiotsim/lists"}