Notifications
Clear all

SMS hex format ???

26 Posts
11 Users
0 Reactions
6,335 Views
fornzix
(@fornzix)
Eminent Member
Joined: 17 years ago
Posts: 35
Topic starter  

I have a Samsung CDMA SCH-R450 phone which I need to get a copy of the SMS messages. I tried Cellebrite, Paraben, BitPim and Susteen. None will get me the messages, however, Cellebrite will do a physical dump of the phone. In that I found the SMS messages however they are in partial hex format. It appears that the date's/time's are in hex and the actual message is in regular text. Does anyone know what format the date/time would be in. Little/Big Endian???? Does anyone know of a script of any type that would/could rip the messages and decode them in a batch process??

As of right now, I have manually video taped scrolling through the messages, but I would really like to get a paper copy. There's too many to write down by hand.


   
Quote
(@burratha)
Eminent Member
Joined: 18 years ago
Posts: 43
 

Paul Sanderson's Revenge tool should be able to decode the timestamps.

If they're anything like GSM Samsung, they *may* be in a 4 byte array.

Convert to binary, reverse the order as they're read little endian.

Concatenate the string, then split as follows

12 bits = year
4 bits = Month
5 bits = Date
5 bits = Hour
6 bits = Minute

I'd be interested to know if this works?


   
ReplyQuote
(@rampage)
Reputable Member
Joined: 17 years ago
Posts: 354
 

i can explain how i managed to extract SMS from a samsung SGH-Z240

by my experience i was able to extract the logical filesystem using bitpim. (using the CDMA protocol)

if the filesystem is the same
SMSs are stored in /User/Msg/SMS
the files you are looking for are RCVD and SENT you can ignore the RCVD.HDR and SENT.HDR

messages are store in PDU format, so you can decode them easly manually, with some bash scripting or with a software for windows called PDU spy

EDIT oh, since till now i've not been able to understand where and how the phonebook and the call log are stored, if you can help me out with this, any information is really appreciated.


   
ReplyQuote
rjpear
(@rjpear)
Trusted Member
Joined: 19 years ago
Posts: 97
 

Heh.. Is this Dead.. I have a similar question… not with a particular phone or carrier, but wanted to know if there was a "STANDARD" (I know ..this is cellphone land where there are no standards…) in the physical makeup of a SMS Message.. Most seem full of nothing but filler (x00) but there are some misc hex located in the code which I am not familiar ..I am looking for Dates/time set etc…

Thanks for any info..

BTW..I sued the BITPIM method also… So much for my CellBrite/Celldek solutions.. heh.. Long Live BitPim!


   
ReplyQuote
(@gkelley)
Estimable Member
Joined: 21 years ago
Posts: 128
 

Heh.. Is this Dead.. I have a similar question… not with a particular phone or carrier, but wanted to know if there was a "STANDARD" (I know ..this is cellphone land where there are no standards…) in the physical makeup of a SMS Message.. Most seem full of nothing but filler (x00) but there are some misc hex located in the code which I am not familiar ..I am looking for Dates/time set etc…

There is and there isn't. The message is usually in plain text. Sometimes the phone number and/or the display name from the phone book is also in plain text. I did some searching and there are some standards with how the dates are stored but I found that the posted "standards" don't always apply. I have found it by trial and error, that is getting a phone of similar type, viewing the hex of a message with a known date and time and finding where it is stored.


   
ReplyQuote
(@burratha)
Eminent Member
Joined: 18 years ago
Posts: 43
 

Just to add to GKelley, you'll find that the message content of GSM messages is usually 7-bit alpha, however this is dictated in the PDU header of the message (TP-DCS - Data coding scheme).

http//www.dreamfabric.com/sms is a very good resource to read.


   
ReplyQuote
fornzix
(@fornzix)
Eminent Member
Joined: 17 years ago
Posts: 35
Topic starter  

As a follow up to this. I think I've found the date and time for the Samsung Text Messages. It appears as though it is 41 hex away from the end of the text of the message. The format is in AOL Time Decimal Little Endian. This is the same for sent and received messages.

I'm still working on deciphering start and stop points, but this is what I have so far.

If someone else has files they can check this on, please post here.


   
ReplyQuote
(@gkelley)
Estimable Member
Joined: 21 years ago
Posts: 128
 

What model Samsung? I have found, at least with LG, that the format can change from model to model.


   
ReplyQuote
fornzix
(@fornzix)
Eminent Member
Joined: 17 years ago
Posts: 35
Topic starter  

I have had two different Samsung phones in the last several weeks. The models were SCH-R450 and SCH-R210.


   
ReplyQuote
fornzix
(@fornzix)
Eminent Member
Joined: 17 years ago
Posts: 35
Topic starter  

As a follow up to this. I think I've found the date and time for the Samsung Text Messages. It appears as though it is 41 hex away from the end of the text of the message. The format is in AOL Time Decimal Little Endian. This is the same for sent and received messages.

I'm still working on deciphering start and stop points, but this is what I have so far.

If someone else has files they can check this on, please post here.

More on this…. If you navigate to the \nvm\sms_wp_os folder from a Cellebrite physical dump of the phone, you will find the SMS Messages. (At least the sent and received) If you look at the message with a hex viewer or RevEnge, the bytes I've decoded so far, are as follows….

Hex offset 0 = message identifier (if the message is saved in the folder as sms_0006 then the value of this byte will be 6 as an unsigned integer8)

Hex offset 2= length of message as an unsignged integer8

Hex offset 71=start of message in plain text - for length noted in hex offset 2

41 hex spaces from end of message = date sent or recieved, in AOL fomat (number of seconds from Epoch date of 1/1/80)

27 hex spaces from date = start of phone number sent to or from, in plain text

—————————————————————–

On the SCH-R450, sent messages had 4 hex spaces after the message and then the 10 digit phone number of the phone in plain text. This was not part of the length of the message. The message was always the length noted in hex offset 2, then 4 hex spaces, then the 10 digit phone number. To get the date, you would go 41 hex spaces from the end of this 10 digit phone number. everything else appeared to be the same as the SCH-R210.

I verified these observations by looking at the actual messages on the phones and by looking at messages sent back and forth from the SCH-R210 to the SCH-R450. This helped confirm the times and which were sent and received.

If anyone has found anything else, I would be interested in finding out about it..

Thanks.


   
ReplyQuote
Page 1 / 3
Share: