├── LICENSE ├── README.md ├── can_vin_find ├── Screenshot.png ├── can_vin_find.php └── candump_ford_focus_2009.can └── img ├── hardware_bsides_scot.jpg ├── hardware_cantact.jpg ├── wiki_cansniffer_output.png ├── wiki_dmesg_output.png └── wiki_ifconfig_output.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 mortedamos 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vehicle-hacking 2 | Guides and scripts for vehicle cybersecurity research. 3 | 4 | For the interesting stuff, take a lookat the Vehicle Hacking Setup Guide, [vehicle-hacking Wiki](https://github.com/mortedamos/vehicle-hacking/wiki/Vehicle-Hacking-Setup-Guide:-Part-0:-Introduction). 5 | -------------------------------------------------------------------------------- /can_vin_find/Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mortedamos/vehicle-hacking/9c218259addc2be2344d46ed7db2a77d02a705db/can_vin_find/Screenshot.png -------------------------------------------------------------------------------- /can_vin_find/can_vin_find.php: -------------------------------------------------------------------------------- 1 | $linedata) { 21 | 22 | if($line < 100000000) { 23 | // echo($linedata); 24 | 25 | $linedata_arr = explode(" ",$linedata); 26 | 27 | // print_r($linedata_arr); 28 | 29 | // entry 4 is arb id 30 | // entries 9 to 16 is the can data 31 | 32 | $arb_id = $linedata_arr[4]; 33 | 34 | $candata = ''; 35 | $candata .= $linedata_arr[9]; 36 | $candata .= $linedata_arr[10]; 37 | $candata .= $linedata_arr[11]; 38 | $candata .= $linedata_arr[12]; 39 | $candata .= $linedata_arr[13]; 40 | $candata .= $linedata_arr[14]; 41 | $candata .= $linedata_arr[15]; 42 | $candata .= $linedata_arr[16]; 43 | 44 | // echo("$line: ARB $arb_id --> $candata\n"); 45 | 46 | $canchar = ''; 47 | $canchar .= chr( hexdec($linedata_arr[9])); 48 | $canchar .= chr(hexdec($linedata_arr[10])); 49 | $canchar .= chr(hexdec($linedata_arr[11])); 50 | $canchar .= chr(hexdec($linedata_arr[12])); 51 | $canchar .= chr(hexdec($linedata_arr[13])); 52 | $canchar .= chr(hexdec($linedata_arr[14])); 53 | $canchar .= chr(hexdec($linedata_arr[15])); 54 | $canchar .= chr(hexdec($linedata_arr[16])); 55 | 56 | // echo("$canchar\n"); 57 | 58 | // find interesting data in ascii 59 | // $pattern = '/[a-z0-9]{2}/i'; 60 | // if( preg_match($pattern, $canchar) ) { 61 | 62 | if($arb_id == "4FF") { 63 | echo("$line: Posible vin in $arb_id --> $canchar.\n"); 64 | // exit; 65 | } 66 | 67 | 68 | } 69 | 70 | 71 | } 72 | 73 | ?> 74 | -------------------------------------------------------------------------------- /img/hardware_bsides_scot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mortedamos/vehicle-hacking/9c218259addc2be2344d46ed7db2a77d02a705db/img/hardware_bsides_scot.jpg -------------------------------------------------------------------------------- /img/hardware_cantact.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mortedamos/vehicle-hacking/9c218259addc2be2344d46ed7db2a77d02a705db/img/hardware_cantact.jpg -------------------------------------------------------------------------------- /img/wiki_cansniffer_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mortedamos/vehicle-hacking/9c218259addc2be2344d46ed7db2a77d02a705db/img/wiki_cansniffer_output.png -------------------------------------------------------------------------------- /img/wiki_dmesg_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mortedamos/vehicle-hacking/9c218259addc2be2344d46ed7db2a77d02a705db/img/wiki_dmesg_output.png -------------------------------------------------------------------------------- /img/wiki_ifconfig_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mortedamos/vehicle-hacking/9c218259addc2be2344d46ed7db2a77d02a705db/img/wiki_ifconfig_output.png --------------------------------------------------------------------------------