"Bodeting" - The Activity of going insane reverse engineering a PSA System
|
|
6 月之前 | |
|---|---|---|
| executables | 6 月之前 | |
| firmware | 6 月之前 | |
| research | 6 月之前 | |
| sample-data | 6 月之前 | |
| README.md | 6 月之前 |
Important Disclaimer: While the structural fields of the packets are mostly well understood, the checksum calculation remains quiet mysterious. Without correctly reproducing the checksum, generating functional packets yourself remains unreliable unless you copy known working ones, therefore this can only be used for repetitive actions with already learnt and working commands.
Contains valid payloads that get accepted by the system if sent to multicast address 239.192.55.2 stop-payloads.txt
If you want to help out with figuring things out this is where to look I'd say
Please IF YOU KNOW HOW TO MAKE THE CHECKSUMS WORK PROPERLY OR KNOW MORE THAN ME PLEASE HELP ME!!!
Server: MQX HTTP - Freescale Embedded Web Server)RTCS FTP Server Readyd:\JenkinsJobs\workspace\Indus\Harmonys\Harmonys_trio\Metis_appli\Middlewares\Third_Party\LwIP\Based on repeated appearances in both firmware strings :
| Username | Password |
|---|---|
public |
jkl1vi5erjnfh |
public |
aSe2=9Z8gOi37* |
CHK = %04x (%d)
CHK BAD !!! %dAlso of note :
F_traitement_trame_PROTOCOLE
F_traitement_trame_vie_repeteur
REP STREAM !!! ERREUR !!!
RX %d/%d (%d/%d)
Each IP Button Bodet Sound Protocol Payload follows a consistent format:
[MEL HEADER]-[LENGTH]-[START]-[SEQUENCE]-[COMMAND]-[ZONE INFO]-[METADATA]-[CHECKSUM]
Seems to send two of the packets each time a button is pressed
4D 45 4C0021 = 33 bytes0100FF, suggesting padding or reserved spaceExamples:
3001 = Melody5001 = Alarm5002 = StopEach zone bit is encoded as:
byte_index = (zone - 1) // 8
bit_index = (zone - 1) % 8
set bit (7 - bit_index) in byte[byte_index]
You can enable multiple zones in a single packet by OR-ing the relevant bits
Examples:
8000 0000 0000 0000 0000 0000 = Zone 8 only0000 8000 0000 0000 0000 0000 = Zone 16 only0000 0000 0000 0000 0020 0000 = Zone 86Note : this is just an assumption not enough testing has been done
After Zone Info:
0001 - Probably Fixed field (sometimes 0002 with certain multizone commands)03 - Volume (1-8)02 - Repeat count (or 00 for infinite)09 - Melody ID (9 in this case)0100 - Possible end-of-command marker, appears to terminate command blocks (expept for stop commands)01 - Fixed(sum of all previous bytes) & 0xFF in most cases, but not always.4d454c 0021 0100 28ff 3001 8000 0000 0000 0000 0000 0000 0001 03 00 01 09 0100 01 d5
8000 ...03, Repeats = 00 (infinite)09D54d454c 001a 0100 24ff 5002 ffff ffff ffff ffff ffff ffff 0f 01 07
FF FF ... (you actually cant choose which zone to turn of system refuses zonemaps here)5002)0F 01 instead of 0100 → supports theory that 0100 indicates only the end of melody/alarm command block07While many packets obey a simple rule:
checksum = sum(packet[:-1]) & 0xFF
... others diverge due to what appears to be a variable offset or conditional logic. Several hypotheses have been explored:
If the checksum is wrong, the Bodet PSA system and its components obviously ignore the packet. Hence generating your own commands reliably is not yet possible unless mimicking an exact known good packet.
This makes full integration with modern systems (for triggering Bodet audio via automation) dependent on further reverse engineering.
If you have firmware dumps, better knowladge of UDP and reverse engeneering checksums or just generally more insights, feel free to contribute
hexen.py)The executables/hexen.py script provides a utility to send raw hex payloads and includes a bruteforce mode for the last byte of a given hex prefix. This is particularly useful for trying to find working checksums or other variable last bytes.
Initiating Bruteforce:
python hexen.pybrute <hex_prefix>
brute 4d454c0021010004ff300180000000000000000000000000010202010f010001Configuration Prompts:
(1) Manual: Sends one packet at a time and asks for feedback.(2) Auto Ascending: Sends all packets from <prefix>00 to <prefix>ff automatically.(3) Auto Descending: Sends all packets from <prefix>ff down to <prefix>00 automatically.0.5, 1) to wait between sending each packet.Interactive Controls (During Bruteforce):
1):
Did it work? (y/n/auto/stop/r=retry last 3/c=cancel):
y: Confirms the current hex string worked. The bruteforce for this prefix stops, and the successful string is saved to the MAGIC file.n: Continues to the next hex value.auto: Switches to auto-ascending mode for the remainder of the current prefix.stop or c: Aborts the current bruteforce operation.r: Resends the last up to 3 packets (including the current one).2 or 3) (Windows Only - requires msvcrt):
During auto mode: press 'c' to cancel, 'r' to retry last 3, 'p' to pause/resume.
c: Cancels the current bruteforce operation.r: Pauses sending, resends the last up to 3 packets, then resumes.p: Toggles pause/resume for the auto-sending process.Saving Results to MAGIC File:
MAGIC file path is defined at the top of hexen.py (default: /Users/crt/Documents/bodeting/research/bad-bruteforcing/attempt-1.txt).full_hex_string is automatically appended to this file.Kein Zauber hat gewirkt oder du hast abgebrochen. Gib den Suffix für '<hex_prefix>' ein, um ihn ins Buch zu kritzeln (oder Enter zum Überspringen):
fa), the script will save hex_prefix + entered_suffix to the MAGIC file.MAGIC file exists and if the file is writable, providing error messages if issues are encountered.This tool aims to simplify the process of testing variations of known packet structures, especially when only the checksum isnt known