In general .code
and .text
sections are synonymous. Both of those section contain executable code. Whereas, .data
section contains non-executable data.
.bss
segment is usually added due to optimization. The size of .bss
is usually really small since it is designated to hold uninitialized data. In comparison, .data
segment is designated to hold global/static variables and data structures.
Second code segment was most likely added manually.
Now, it is impossible to answer why the binary has two sections of code just by looking at the names. I think it is obviously unusual. I can state one thing for sure, you have two sections for a reason. However, you gonna have to fig in to figure out what the reason is.
First thing I would do is try to confirm segment permissions and CLASS. True code segment will have Read
and Execute
permissions. You can use lots of different tools to verify it. For instance, if you were to use IDA, it is done with Segments Subview
, which could be accessed with Shift + F7. You might get lucky and spot the fake right from the get go.