[:tr]
Sızma Adımı İçin Metasploit
Metasploit, arabalara bağlanma yeteneği ve modülleri geliştirdi. Otomobilin CAN protokolüne bir seri arayüz üzerinden bağlanmaktır. Oradan, Metasploit’te önceden oluşturulmuş modüllerin birkaçıyla aracın ağı üzerine kötü niyetli trafik gönderebiliriz.
Otomobilin ODC II Konektörüne bağlanmak için bir cihaz sahibi olmak gerekecektir. Piyasada birkaç tane var, ancak nispeten ucuz bir Bluetooth ODB II mini arayüzü işimizi görecektir. Aracın CAN ağıyla etkin bir şekilde iletişim kuran ve Bluetooth ile Metasploit ile sisteminize bağlanan, bu nedenle yerleşik Bluetooth’lu bir bilgisayara sahip olmanız veya bir Bluetooth USB adaptörü satın almanız gerekecektir.
Seri Bağlantı Noktasını Kurun
Artık donanımımızı yerleştirdiğimize göre, gerekli yazılımı kurmamız gerekiyor. Unutmayın, CAN protokolü bir seri protokoldür, bu yüzden seri “konuşmak” için Ruby gem “seri bağlantı noktası” kurmamız gerekecek.
kali> gem install serialport
ELM 327’deki Bluetooth’a Bağlanın
Daha sonra test ettiğimiz arabanın ELM 327 adaptörüyle konuşturmak için Bluetooth adaptörümüzü bağlamamız gerekiyor. ELM 327’yi arabadaki ODB II konektörüne yerleştirmeniz ve arabadaki yardımcı programları açmanız gerektiğini burada belirtmekte fayda var.
ELM 327 cihazına bağlanmak için MAC adresine ihtiyacımız var. Bluetooth cihazlarını taramak ve bize MAC adresini sağlamak için hcitool yardımcı programını kullanabiliriz.
kali> hcitool scan
Şimdi Bluetooth adaptörümüzün MAC adresini kullanarak ELM 327’ye bağlamamız gerekiyor. MAC adresini aşağıdaki gibi çift tırnak arasında kullandığınızdan emin olun.
kali> rfcomm connect /dev/rfcomm1 "00:19:6D:36:4A:9D"
ELM 327 Replay Programını Çalıştırın
Bir sonraki adım, Metasploit’in ELM 327 yonga seti ile iletişim kurmasını sağlayan ELM 327 replay’ı çalıştırmaktır. /usr/share/metasploit-framework/tools/hardware adresine giderek bulabilirsiniz.
Çalıştırmadan önce yardım ekranına bir göz atalım.
Gördüğünüz gibi, temelde sadece iki parametre gerektirir;
Hız (varsayılan 115200) ve seri aygıt (varsayılan /dev/ttyUSB0). Hangi seri aygıtın kullanılacağını belirlemek için, Linux programı dmesg’i (ekran mesajı) ve “tty” için grep’i kontrol edin. Benim durumumda bu ttyS0’dır. Sizde değişkenlik gösterebilir.
Şimdi elm327 replay seri cihaz ile çalıştırın ve hızı aşağıda görüldüğü gibi varsayılan değerde bırakın.
kali> ruby elm327_relay.rb -s /dev/ttyS0
Metasploit’i Başlatın
Artık Kali Linux’umuzu ELM 327 cihazıyla konuşacak şekilde yapılandırdığımıza göre, Metasploit’e bir donanım köprüsü oluşturmamız gerekiyor. Metasploit, TCP/IP ile iletişim kurmak için tasarlanmıştır. Şimdi seri port üzerinden otomobile özgü CAN protokolü ile iletişim kurmak için buna ihtiyacımız var.
İlk önce Metasploit’i başlatın.
kali> msfconsole
Ardından, otomotiv modüllerini arayın.
kali> search automotive
Bizim case’imiz için /auxiliary/client/hwbridge/connect modülünü kullanmamız gerekiyor.
Donanım köprümüzü oluşturmak için bu modülü run edelim.
MSF ile Sızma Modüllerini Kullan
Metasploit ile araçtaki CAN protokolü arasındaki donanım köprümüzü oluşturduğumuza göre artık Metasploit’in araba hack modüllerini kullanmaya başlayabiliriz.
Örneğin aracın bilgilerini almak istersek;
Bu modül için bilgi girdiğimizde, bu modülün tüm araç DTC’lerini (Diyagnostik Hata Kodları) ve hız, soğutma suyu sıcaklığı, VIN gibi diğer bilgileri sorgulayıp topladığını ve hatta DTC’leri temizlediğini görebiliriz.
Artık arabanın cihazlarıyla doğrudan iletişim kurmak için Linux sistemimizi ve Metasploit’e doğrudan arabanın ağına bağlayabiliriz.
-
Bu içerik dizisinin diğer bölümlerine aşağıdaki linklerden ulaşabilirsiniz:
Sorumluluk Reddi Beyanı
Değerli ziyaretçimiz,
Bu blog yazımız bilgi amaçlı olup, saldırılara karşı farkındalığı arttırabilmek ve bu doğrultuda tedbirler alınabilmesi amacı ile hazırlanmıştır. Bu yazıda geçen bilgilerin amacı dışında kullanılmasının hukuki olmadığını hatırlatırız. Anlatılanlardan kaynaklanabilecek doğrudan ya da dolaylı zarar ve kayıplardan CyberArts firmasının sorumlu tutulamayacağını beyan ederiz.
Siber Güvenlik, Dijital Dönüşüm, MSSP, Sızma Testi, KVKK, GDPR, ISO 27001, ISO 27701 ve DDO Bilgi ve İletişim Güvenliği Rehberi başlıklarıyla ilgili teklif almak için lütfen tıklayın.
[:en]
Metasploit for Infiltrating Step
Metasploit has developed modules and the ability to connect to cars. It is to connect to the car ‘s CAN protocol via a serial interface. From there, we can send malicious traffic onto the vehicle’s network with a few of the modules already built in Metasploit.
It will be necessary to own a device to connect to the car‘s ODC II Connector. There are several on the market, but a relatively inexpensive Bluetooth ODB II mini- interface will do. You will need to have a computer with built-in Bluetooth, or purchase a Bluetooth USB adapter, which effectively communicates with the vehicle’s CAN network and connects via Bluetooth to your system via Metasploit.
Install Serial Port
Now that we have placed our hardware, we need to install the necessary software. Remember, the CAN protocol is a serial protocol, so we will need to set up a Ruby gem “serial port” to “talk” to serial.
kali > gem install serialport
Connect to Bluetooth on ELM 327
Then we need to connect our Bluetooth adapter to make it talk to the ELM 327 adapter of the car we are testing. It is worth noting here that you need to insert the ELM 327 into the ODB II connector in the car and open the utilities in the car.
We need the MAC address to connect to the ELM 327 device. We can use the hcitool utility to scan for bluetooth devices and provide us with the MAC address.
kali > hcitool scan
Now we need to connect it to the ELM 327 using the MAC address of our Bluetooth adapter. Make sure to use the MAC address in double quotes like below.
kali > rfcomm connect /dev/rfcomm1 "00:19:6D:36:4A:9D"
ELM 327 Replay Program
The next step is to run the ELM 327 replay, which allows Metasploit to communicate with the ELM 327 chipset. You can find it by going to / usr / share / metasploit-framework / tools /hardware.
Let’s take a look at the help screen before running it.
As you can see, it basically only requires two parameters;
Speed (default 115200) and serial device (default /dev/ttyUSB0). To determine which serial device to use, check the Linux program dmesg (screen message) and grep for ” tty “. In my case it is ttyS0. It may vary for you.
Now run elm327 replay with serial device and leave the speed at default value as seen below.
kali > ruby elm327_relay.rb -s /dev/ttyS0
Launch Metasploit
Now that we have configured our Kali Linux to talk to the ELM 327 device, we need to create a hardware bridge to Metasploit . Metasploit is designed to communicate with TCP/IP. Now we need it to communicate with the car specific CAN protocol over the serial port.
First start Metasploit.
kali > msfconsole
Next, search for automotive modules.
kali > search automotive
For our case / auxiliary / client / hwbridge / connect We need to use the module.
run this module to create our hardware bridge.
Use Infiltration Modules with MSFNow that we have created our hardware bridge between Metasploit and the CAN protocol in the vehicle, we can now start using Metasploit ‘s car hacking modules.
For example, if we want to get the information of the vehicle;
When we enter information for this module, we can see that this module interrogates and collects all vehicle DTCs ( Diagnostic Trouble Codes) and other information such as speed, coolant temperature, VIN and even clears DTCs.
Our Linux system and Metasploit directly to the car’s network to communicate directly with the car’s devices.
You can access other parts of this content series at the following links:
- How Should New Generation Automobile Safety Tests Be Done? [1]
- How Should New Generation Automobile Safety Tests Be Done? [2]
Disclaimer
Dear visitor,
This blog post is for information purposes and has been prepared with the aim of raising awareness against attacks and taking measures in this direction. We remind you that it is not legal to use the information in this article for any other purpose. We declare that CyberArts company cannot be held responsible for direct or indirect damages and losses that may arise from what is explained.
To request a quotation for the following: Cyber Security, Digital Transformation, MSSP, Penetration Testing, KVKK, GDPR, ISO 27001 and ISO 27701, please click here.
[:]