Using accelerometer and microphone data to decode victim's keyboard input without any electronic hacking.
Experiment video will be announced
I Strongly prohibit any usage of this model and concept to be used in exploit situation.
Therefore, I'm not going to open data sets and exact methods directly to prevent exploit usage of method.
![introduction](https://private-user-images.githubusercontent.com/35446381/286189780-239a0a94-ed0b-4397-ade6-333495077972.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NDg3MTIsIm5iZiI6MTcyMzk0ODQxMiwicGF0aCI6Ii8zNTQ0NjM4MS8yODYxODk3ODAtMjM5YTBhOTQtZWQwYi00Mzk3LWFkZTYtMzMzNDk1MDc3OTcyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDAyMzMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwNmM0MDRjNmE2NjNlOWRlNTg3YWY1M2QzNDFkNmVjZGNiNTU2ZDQ1NzUxYmU4ZjExYjFiMjQ2NDZhMzE1MjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MBl7L8jlQxImioPlKxP9OsevYiHAPMx5s_qFYIBTL-Q)
Record vibration & audio of the nearby device with a keypad using a smartphone.
from 0 to 9 and 'z', 'x', 'c', 'v', total of 14 classes of keyboard data is collected.
MacBook Pro, Macbook Air, Gaming Laptop, Wireless keyboard are used. Cafe noise and silent noise are combined.
Run through feature extractor & neural net to train.
Split data for test & validation is used for testing.
TBA, Demonstration of the project will be announced shortly
![Screenshot 2023-11-28 at 17 53 11](https://private-user-images.githubusercontent.com/35446381/286189439-36de7385-7db2-4a08-a047-ef68c21a290e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NDg3MTIsIm5iZiI6MTcyMzk0ODQxMiwicGF0aCI6Ii8zNTQ0NjM4MS8yODYxODk0MzktMzZkZTczODUtN2RiMi00YTA4LWEwNDctZWY2OGMyMWEyOTBlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDAyMzMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlNmQwNTdjM2VlMTgxMjliMTliYzFiNjk1MjQ0NzIzNGQzMTZiMzEwZGVjNTMwMWQ0ZmFiMjUzYmU0MzZmZTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kU75cXwU9lk3HXtj-Cx879O5k4r9swXTqgDGtArf38o)
by comparing acc & audio data in plot I found that upper part of the laptop picks the most sharp edges of data
![data collection](https://private-user-images.githubusercontent.com/35446381/286190044-975d1c5f-c2b6-4061-a29c-7bda239b0e75.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NDg3MTIsIm5iZiI6MTcyMzk0ODQxMiwicGF0aCI6Ii8zNTQ0NjM4MS8yODYxOTAwNDQtOTc1ZDFjNWYtYzJiNi00MDYxLWEyOWMtN2JkYTIzOWIwZTc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDAyMzMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE3ZjZmZjI5NTVmMTIzM2ExZGQ5NWQ2YmJhZjI4YjkwNWQxNzg0YWIzNjAyOWExOTI0MWJmODgzOThjYTc2MjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qulbKYFF1Iir6tIxQ9Wh-qckvBwdCJ_8pYtEKdQxdmw)
I've collected data using Sensor Loggerapplication. Turn audio & accelerometer data option on.
![data preparation](https://private-user-images.githubusercontent.com/35446381/286189955-dc9f0c29-46c8-44eb-bfba-c264f1f3917e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NDg3MTIsIm5iZiI6MTcyMzk0ODQxMiwicGF0aCI6Ii8zNTQ0NjM4MS8yODYxODk5NTUtZGM5ZjBjMjktNDZjOC00NGViLWJmYmEtYzI2NGYxZjM5MTdlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDAyMzMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmZGQxOGNhMzRhNzdhZDY0OWEyNGI5NjUxZDc0NmNkMzI1OTc5ZmZhYTQ2MjM4MzY1ODU2NTZhMjllZjZkMmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0kv-88GsFV_596USbidpejcVft37hklvOEdztqe9zpc)
![feature extraction](https://private-user-images.githubusercontent.com/35446381/286191510-12e5c924-0427-4eec-b5dd-9125c0e0eb87.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NDg3MTIsIm5iZiI6MTcyMzk0ODQxMiwicGF0aCI6Ii8zNTQ0NjM4MS8yODYxOTE1MTAtMTJlNWM5MjQtMDQyNy00ZWVjLWI1ZGQtOTEyNWMwZTBlYjg3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDAyMzMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE2Yzg4OWMxY2I4OGIzMTRjZGQ4Yzg2NWRjZjY4NjIxYWYyOThkYTNlMTllYmFhOGM4Zjg1NmM0NWJmNjhkZDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HCiwor0v8S-XMtuOAZzjvTAXZI9z6YaoTVRiuD5n5nw)
for Accelerometer, Auto-Correlation, PSD, and FFT were used for feature extraction.
and for Audio, MFCC, and FFT were used.
Inspired from TapNet we've made simple convolutional layers
![Screenshot 2023-11-28 at 18 02 13](https://private-user-images.githubusercontent.com/35446381/286192079-7b2724b2-13f2-4b98-9419-6e4b01cf03e2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5NDg3MTIsIm5iZiI6MTcyMzk0ODQxMiwicGF0aCI6Ii8zNTQ0NjM4MS8yODYxOTIwNzktN2IyNzI0YjItMTNmMi00Yjk4LTk0MTktNmU0YjAxY2YwM2UyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDAyMzMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIyMTk2YjJjMmIzZDg1OTBmN2NkMzhjODgwZjczNGMwOGQzZGUwYjhmMTY3NDVlZTIxYWJhMDY0ZDEyZjMzMDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ACiACOfIp8Y0XeAR-L6BdvHd3uFQZIWhZfdUY4KQciA)
The best data is 93% accuracy.
This model also had F1 score: 0.8990. Precision: 0.8812 and Recall: 0.9175
- util.py : 연산에 필요한 각종 함수가 있습니다. CSV에 쓰기 등이 있습니다
- feature Extractor.py : 데이터에 대한 featureExtractor함수가 들어있습니다.
- data Preprocess.py : raw 데이터를 1 stroke에 맞게 가공하고, feature extraction을 수행합니다
- slice() : 데이터를 자르는 interface입니다.
- 이후 자동으로 데이터에 대한 feature extraction이 실행됩니다.
- range(10, 14, 1) : range값을 조절하여 처리하고자하는 데이터를 지정합니다.
- 데이터는 CSV가 존재할 경우 이어쓰기를 합니다. 필요시 파일을 삭제후 진행하십시오.
- backup : 원본 데이터의 사본이 있습니다.
- experimentData : 아이디어 검증 및 센서 데이터 수집 위치를 결정하기 위한 프로젝트입니다.
- feature extraction을 구현하고, feature의 가짓수와 종류를 결정하는 프로젝트입니다.
- data : raw한 데이터가 들어있습니다.