Show older

Moving away from LMAC Firmware (since we got no code) ... Let's study the mysterious Library "libwifi" ... Which has been decompiled into C by BraveHeartFLOSSDev

github.com/BraveHeartFLOSSDev/

"wifi_main" lives in the mysterious Library "libwifi" ... Let's study the decompiled C code (thanks to BraveHeartFLOSSDev and Ghidra)

github.com/lupyuen/bl602nutcra

"wifi_main" calls "ke_evt_schedule" to do Tasks ... GitHub Search shows that "ke_evt_schedule" is also defined in ... AliOS! 😲

github.com/lupyuen/bl602nutcra

But does "ke_evt_schedule" really come from AliOS? Not quite ... "ke_evt_schedule" actually comes from ... CEVA RivieraWaves! 😲

github.com/mclown/AliOS-Things

The AliOS / RivieraWaves code we saw earlier was for Beken BK7231U WiFi + BLE SoC ... Is it related to ? 🤔

bekencorp.com/en/goods/detail/

AliOS for Beken BK7231U WiFi SoC contains LMAC Firmware Code ... Is this the same LMAC Firmware that runs on 's Radio? 🤔 Super Exciting!

github.com/lupyuen/AliOS-Thing

From Now On: We shall read and understand the AliOS / RivieraWaves Source Code ... While comparing it with the Decompiled Code for libwifi ... Just to be sure that they are the same 🤝

github.com/lupyuen/AliOS-Thing

Back to ke_evt_schedule, the function in Driver Kernel that handles every WiFi Event ... Let's hunt for ke_evt_hdlr and discover the WiFi Events

github.com/lupyuen/AliOS-Thing

txl_payload_handle handles Payloads by doing ... nothing! But txl_payload_handle_backup seems to be the right function that handles WiFi Payloads 🤔

github.com/lupyuen/bl602nutcra

Payload Handler calls rxu, txl and txu functions ... Fortunately these are defined in the AliOS / RivieraWaves Source Code we saw earlier

github.com/lupyuen/bl602nutcra

Let's do Quantitative Analysis of the Decompiled Demo Firmware ... How many lines of code do we actually need to Reverse Engineer ... Now that we've found some matching source files?

github.com/lupyuen/bl602nutcra

Quantitative Analysis of Decompiled Firmware is nearly complete! Actual lines of WiFi code to be reverse engineered: 10,500

Google Sheets: docs.google.com/spreadsheets/d

@lupyuen A friend asked me to mention Rule 377 to you. It's a mass surveillance rule. The backlash can already be felt in the West.

This friend also wanted to complement you on the quality of your analysis.

I'm glad to hear that the 1st Edition is almost finished.

@lupyuen

@AmpBenzScientist You may wanna pass a word to Prof, I find his revving work very very impressive. Wish I could contribute on lmac and other parts with no sourcecode to relate to, if I manage.

@PawelK @lupyuen Nearly all of the code is available as low level C from the RE work. I'm passively working on getting the rest to even disassemble. I'll pass along the gratz and the news.

@lupyuen
Very interesting analysis and nice method of relating a known source code base with decced binary.

Great job, Prof Lup.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.