{"action":"created","issue":{"url":"https://api.github.com/repos/rinodung/webgoat/issues/12","repository_url":"https://api.github.com/repos/rinodung/webgoat","labels_url":"https://api.github.com/repos/rinodung/webgoat/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/rinodung/webgoat/issues/12/comments","events_url":"https://api.github.com/repos/rinodung/webgoat/issues/12/events","html_url":"https://github.com/rinodung/webgoat/issues/12","id":129944684,"number":12,"title":"Bài 10: Injection Flaws","user":{"login":"rinodung","id":7805715,"avatar_url":"https://avatars.githubusercontent.com/u/7805715?v=3","gravatar_id":"","url":"https://api.github.com/users/rinodung","html_url":"https://github.com/rinodung","followers_url":"https://api.github.com/users/rinodung/followers","following_url":"https://api.github.com/users/rinodung/following{/other_user}","gists_url":"https://api.github.com/users/rinodung/gists{/gist_id}","starred_url":"https://api.github.com/users/rinodung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rinodung/subscriptions","organizations_url":"https://api.github.com/users/rinodung/orgs","repos_url":"https://api.github.com/users/rinodung/repos","events_url":"https://api.github.com/users/rinodung/events{/privacy}","received_events_url":"https://api.github.com/users/rinodung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"hoaihau23111991","id":16969528,"avatar_url":"https://avatars.githubusercontent.com/u/16969528?v=3","gravatar_id":"","url":"https://api.github.com/users/hoaihau23111991","html_url":"https://github.com/hoaihau23111991","followers_url":"https://api.github.com/users/hoaihau23111991/followers","following_url":"https://api.github.com/users/hoaihau23111991/following{/other_user}","gists_url":"https://api.github.com/users/hoaihau23111991/gists{/gist_id}","starred_url":"https://api.github.com/users/hoaihau23111991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoaihau23111991/subscriptions","organizations_url":"https://api.github.com/users/hoaihau23111991/orgs","repos_url":"https://api.github.com/users/hoaihau23111991/repos","events_url":"https://api.github.com/users/hoaihau23111991/events{/privacy}","received_events_url":"https://api.github.com/users/hoaihau23111991/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-01-30T05:45:22Z","updated_at":"2016-02-26T07:28:54Z","closed_at":null,"body":"![injection flaws](https://cloud.githubusercontent.com/assets/7805715/12693971/4d748696-c74f-11e5-914b-a8056f319520.png)\r\n"},"comment":{"url":"https://api.github.com/repos/rinodung/webgoat/issues/comments/189146607","html_url":"https://github.com/rinodung/webgoat/issues/12#issuecomment-189146607","issue_url":"https://api.github.com/repos/rinodung/webgoat/issues/12","id":189146607,"user":{"login":"rinodung","id":7805715,"avatar_url":"https://avatars.githubusercontent.com/u/7805715?v=3","gravatar_id":"","url":"https://api.github.com/users/rinodung","html_url":"https://github.com/rinodung","followers_url":"https://api.github.com/users/rinodung/followers","following_url":"https://api.github.com/users/rinodung/following{/other_user}","gists_url":"https://api.github.com/users/rinodung/gists{/gist_id}","starred_url":"https://api.github.com/users/rinodung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rinodung/subscriptions","organizations_url":"https://api.github.com/users/rinodung/orgs","repos_url":"https://api.github.com/users/rinodung/repos","events_url":"https://api.github.com/users/rinodung/events{/privacy}","received_events_url":"https://api.github.com/users/rinodung/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T07:28:54Z","updated_at":"2016-02-26T07:28:54Z","body":"**Injection Flaws - Numeric SQL Injection**\r\nTrong ứng dụng web sẽ có một số câu lệnh truy vấn query, where mà điều kiện truy vấn là input đâu vào của người dùng, nếu không được kiểm tra thì người tấn công có thể thêm vào một số đoạn code làm cho câu lệnh where không còn đúng nữa.\r\n\r\nTrong bài này câu lệnh truy vấn select sẽ dựa vào input là số id của vùng(station) nào đó, chúng ta thêm đoạn `or 1=1` vào câu where làm cho câu lệnh select chọn hết những vùng(station) khác.\r\n\r\ncode: `or 1=1`\r\nCậu lệnh bình thường: \r\nSELECT * FROM weather_data WHERE station = 101\r\n\r\nCâu lệnh sai: \r\nSELECT * FROM weather_data WHERE station = 101 or 1=1\r\nDemo: https://www.youtube.com/watch?v=xnAoquiiVsU&feature=youtu.be"}}