pOOBs4-buildroot icon indicating copy to clipboard operation
pOOBs4-buildroot copied to clipboard

Automatical keystrokes to exploit

Open DanielVolz opened this issue 4 years ago • 6 comments

I know it is kind of an over engineering. But what about an automation of this "manual labor" to execute the exploit?

https://github.com/PaulJenkin/PS4RaspberryPi.git is offering this possibility. Unfortunately the approach is not open source.

How can one do this automatically? What is required?

Do you have an idea?

DanielVolz avatar Feb 02 '22 19:02 DanielVolz

We can use USB HID gadget to emulate a keyboard. Need to enable it as a module first. https://github.com/torvalds/linux/blob/88808fbbead481aedb46640a5ace69c58287f56a/drivers/usb/gadget/legacy/Kconfig#L453

Documentation with example: https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget_hid.rst

Shivelight avatar Feb 03 '22 01:02 Shivelight

Or this https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget_configfs.rst

Example: https://github.com/qlyoung/keyboard-gadget

Shivelight avatar Feb 03 '22 02:02 Shivelight

After trial and error, I managed to get it working. I'm using configfs as it is easier to setup. g_hid module is way too complicated to setup; platform driver, platform code, hid descriptor, etc 😩

I will write a keystroke helper based on g_hid documentation.

Shivelight avatar Feb 03 '22 10:02 Shivelight

You're fast!

Maybe you can push your progress to a new branch or to the dev branch so I can test it too.

But no pressure. I can look into it earliest on the weekend.

DanielVolz avatar Feb 03 '22 11:02 DanielVolz

Just a heads-up, I have a flight tomorrow and I'm not bringing my PS4 with me.

Will commit my findings on sunday.

Shivelight avatar Feb 04 '22 13:02 Shivelight

Pushed to dev branch

Shivelight avatar Feb 07 '22 05:02 Shivelight