Modifying section properties

23 views
Skip to first unread message

er4z0r

unread,
Jan 17, 2013, 6:44:58 AM1/17/13
to pef...@googlegroups.com
Hi,

is it possible to change the permissions of a section?
e.g. I want to learn how to write a packer doing a simple
xor of .text. Therefore I need wirte on section .text

thanks
er4z0r

Ero Carrera

unread,
Jan 18, 2013, 4:16:34 AM1/18/13
to pef...@googlegroups.com
It is possible. You can take a look at:

http://code.google.com/p/pefile/wiki/UsageExamples#Reading_and_writing_standard_header_members

and follow the same idea for the relevant fields of the section header
and data. You can write data using set_bytes_at_rva() or
set_bytes_at_offset().
> --
> You received this message because you are subscribed to the Google Groups
> "pefile" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pefile/-/MGqkZVlh3R4J.
> To post to this group, send email to pef...@googlegroups.com.
> To unsubscribe from this group, send email to
> pefile+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pefile?hl=en.
Reply all
Reply to author
Forward
0 new messages