{"id":27127700,"url":"https://github.com/jcsec-security/smart-contracts-and-hacking-101","last_synced_at":"2025-04-07T17:57:37.210Z","repository":{"id":213533566,"uuid":"734346344","full_name":"jcsec-security/smart-contracts-and-hacking-101","owner":"jcsec-security","description":"Material of my talk/workshop \"Smart contracts and Hacking 101\"","archived":false,"fork":false,"pushed_at":"2025-03-27T12:35:57.000Z","size":8,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T13:34:38.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcsec-security.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-12-21T13:04:45.000Z","updated_at":"2025-03-27T12:36:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"8fa5390e-3693-46bb-bbfb-9dc362b8ec96","html_url":"https://github.com/jcsec-security/smart-contracts-and-hacking-101","commit_stats":null,"previous_names":["jcsec-security/smart-contract-hacking-101","jcsec-security/smart-contracts-and-hacking-101"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcsec-security%2Fsmart-contracts-and-hacking-101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcsec-security%2Fsmart-contracts-and-hacking-101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcsec-security%2Fsmart-contracts-and-hacking-101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcsec-security%2Fsmart-contracts-and-hacking-101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcsec-security","download_url":"https://codeload.github.com/jcsec-security/smart-contracts-and-hacking-101/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704511,"owners_count":20982293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-04-07T17:57:36.655Z","updated_at":"2025-04-07T17:57:37.199Z","avatar_url":"https://github.com/jcsec-security.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Contracts and Hacking 101\n\nIf you are attending my talk about blockchain technology, smart contracts and common security issues of the latter, this repo is for you!\n\n## Smart Contracts\n\nTo have your first peek into a [basic smart contract](./basics/MyFirstApp.sol) deployed in the Sepolia testnet, check this [Etherscan URL](https://sepolia.etherscan.io/address/0x4747df6e3bc844b21f681dcf0270e9cab51b33a6)\n\nHere you can check:\n- History of transactions directed to the contract\n- Current Ether balance, although the most common ERC20 tokens are also listed\n- Deployed bytecode, and, optionally, the verified code\n- Value of the state variables (storage)\n\n## Vulnerabilities\n\n1) Front-running: \n    - [Crack the hash challenge](./vulnerabilities/crack_the_hash.sol)\n2) Clear-text secrets:\n    - [Case study 1](./vulnerabilities/password_1.sol)\n    - [Case study 2](./vulnerabilities/password_2.sol)\n    - [Case study 3](./vulnerabilities/password_3.sol)\n3) Integer over/underflow:\n    - Play with a basic one [deployed in Sepolia](https://sepolia.etherscan.io/address/0xdf847035247a545d5ba09f3ebdef48786603c65f) - unchecked, solc 0.7.6\n    - [Cooldown!](./vulnerabilities/cooldown.sol) - checked underflow\n5) Reentrancy:\n    - [Victim](./vulnerabilities/reentrancy_victim.sol)\n    - [Attacker template](./vulnerabilities/reentrancy_attacker.sol)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcsec-security%2Fsmart-contracts-and-hacking-101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcsec-security%2Fsmart-contracts-and-hacking-101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcsec-security%2Fsmart-contracts-and-hacking-101/lists"}