diff options
author | FreeArtMan <dos21h@gmail.com> | 2021-05-27 21:10:45 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2021-05-27 21:10:45 +0100 |
commit | efa24b220d9633d5d7bfef632b33df180dcb0e74 (patch) | |
tree | ac8502acf0116fbbb42a09c6956be70b9a3fc49f /md/writeup/elf_text_section.md | |
parent | e63ed8a651e5246f8698a9c1c3e540029710d0e9 (diff) | |
download | md-content-efa24b220d9633d5d7bfef632b33df180dcb0e74.tar.gz md-content-efa24b220d9633d5d7bfef632b33df180dcb0e74.zip |
Update 10 html to md articles
Diffstat (limited to 'md/writeup/elf_text_section.md')
-rw-r--r-- | md/writeup/elf_text_section.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/md/writeup/elf_text_section.md b/md/writeup/elf_text_section.md new file mode 100644 index 0000000..60b8d58 --- /dev/null +++ b/md/writeup/elf_text_section.md @@ -0,0 +1,41 @@ +title:ELF text section +keywords:elf,linux + +# ELF text section +This code based on .text writable + +Find out .text section and make it writable. +segmentcheck.h contains two functions + +```c +int sec_text_check( FILE* ); +``` + +check if given file have .text writable section or not. return 0 if +fasle, 1 if true and -1 if there was some kind error. + +```c +int sec_text_set( FILE* , int ); +``` +set section segment to writable/unwritable depends on second value +that canbe 0 or 1. +Code: +Source includes two tests for both functions.I have not tested both +functions very whell. That whay there can be some error.I have used +used that for proving concept. And have checked result with +``` +test1 +``` +and +``` +readelf -l simple +``` + + + +## Links +http://toku.es/2010/06/text-writable/ + +## Downloads +elf_segment.tar.gz - +26KiB - http://archive.main.lv/files/writeup/elf_text_section/elf_segment.tar.gz |