Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS parsing and presentation #523

Merged
merged 5 commits into from
May 3, 2019
Merged

TLS parsing and presentation #523

merged 5 commits into from
May 3, 2019

Conversation

JakubPruzinec
Copy link
Contributor

Thread-local storage information and callback extraction
#417

@@ -68,6 +68,12 @@ class PeFormatParser64 : public PeFormatParser
virtual bool getDebugEntryPointerToRawData(unsigned long long index, unsigned long long& pointerToRawData) const override;
virtual unsigned long long getResourceDirectoryOffset() const override;
virtual const PeLib::ResourceNode* getResourceTreeRoot() const override;
virtual unsigned long long getTlsStartAddressOfRawData() const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

override is missing here and also on other lines under this one.

@metthal
Copy link
Member

metthal commented Apr 5, 2019

I went through the code once more and I am not sure whether this will correctly work for all 64-bit PE binaries. PeLib seems to be truncating half of bytes when returning attributes which are 64-bit. I think this may require modification of PeLib, more specifically TlsDirectory in PeLib and turning all attributes which are either 32-bit/64-bit depending on the PE32/PE32+ into typename FieldSizes<bits>::VAR4_8. Those are:

StartAddressOfRawData
EndAddressOfRawData
AddressOfIndex
AddressOfCallBacks

@metthal
Copy link
Member

metthal commented Apr 23, 2019

Thanks for taking care of PE32+ but it will still need modification of pelib because it truncates them to 32-bit values (dword).

@metthal metthal merged commit 6053642 into avast:master May 3, 2019
metthal added a commit that referenced this pull request May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants