pwnlib.elf — ELF Executables and Libraries
Most exploitable CTF challenges are provided in the Executable and Linkable
Format (ELF). Generally, it is very useful to be able to interact with
these files to extract data such as function addresses, ROP gadgets, and
writable page addresses.
ELF Modules
pwnlib.elf.elf— ELF Files- Example Usage
- Module Members
ELFELF.__getitem__()ELF.__init__()ELF.__repr__()ELF._decompress_dwarf_section()ELF._get_linked_strtab_section()ELF._get_linked_symtab_section()ELF._get_section_header()ELF._get_section_header_stringtable()ELF._get_section_name()ELF._get_segment_header()ELF._identify_file()ELF._make_gnu_verdef_section()ELF._make_gnu_verneed_section()ELF._make_gnu_versym_section()ELF._make_section()ELF._make_segment()ELF._make_sunwsyminfo_table_section()ELF._make_symbol_table_index_section()ELF._make_symbol_table_section()ELF._parse_elf_header()ELF._patch_elf_and_read_maps()ELF._populate_functions()ELF._populate_got()ELF._populate_libraries()ELF._populate_plt()ELF._populate_symbols()ELF._populate_synthetic_symbols()ELF._read_dwarf_section()ELF._section_offset()ELF._segment_offset()ELF.asm()ELF.bss()ELF.checksec()ELF.debug()ELF.disable_nx()ELF.disasm()ELF.dynamic_by_tag()ELF.dynamic_string()ELF.dynamic_value_by_tag()ELF.fit()ELF.flat()ELF.from_assembly()ELF.from_bytes()ELF.get_dwarf_link()ELF.get_ehabi_infos()ELF.get_machine_arch()ELF.get_section_by_name()ELF.get_section_index()ELF.get_segment_for_address()ELF.get_shstrndx()ELF.get_supplementary_dwarfinfo()ELF.has_dwarf_link()ELF.has_ehabi_info()ELF.has_phantom_bytes()ELF.has_section()ELF.iter_notes()ELF.iter_properties()ELF.iter_segments_by_type()ELF.load_from_path()ELF.make_relative_loader()ELF.num_sections()ELF.num_segments()ELF.offset_to_vaddr()ELF.p16()ELF.p32()ELF.p64()ELF.p8()ELF.pack()ELF.patch_custom_libraries()ELF.process()ELF.read()ELF.save()ELF.search()ELF.section()ELF.set_interpreter()ELF.set_runpath()ELF.string()ELF.u16()ELF.u32()ELF.u64()ELF.u8()ELF.unpack()ELF.vaddr_to_offset()ELF.write()ELF.__weakref__ELF.addressELF.archELF.asanELF.aslrELF.bitsELF.buildELF.buildidELF.bytesELF.canaryELF.configELF.dataELF.debuginfoELF.dwarfELF.elftypeELF.endianELF.entryELF.entrypointELF.execstackELF.executableELF.executable_segmentsELF.fileELF.fortifyELF.functionsELF.gotELF.ibtELF.libcELF.libc_start_main_returnELF.libraryELF.libsELF.linkerELF.mapsELF.memoryELF.mmapELF.msanELF.nativeELF.non_writable_segmentsELF.nxELF.osELF.packedELF.pathELF.pieELF.pltELF.relroELF.rpathELF.runpathELF.rwx_segmentsELF.sectionsELF.segmentsELF.shadowstackELF.startELF.statically_linkedELF.strippedELF.symELF.symbolsELF.ubsanELF.versionELF.writable_segments
Functiondotdict
pwnlib.elf.config— Kernel Config Parsingpwnlib.elf.corefile— Core Files- Using Corefiles to Automate Exploitation
- Module Members
CorefileCorefile.__init__()Corefile._populate_got()Corefile._populate_plt()Corefile.debug()Corefile.getenv()Corefile.argcCorefile.argc_addressCorefile.argvCorefile.argv_addressCorefile.envp_addressCorefile.exeCorefile.fault_addrCorefile.libcCorefile.mappingsCorefile.mapsCorefile.pcCorefile.pidCorefile.ppidCorefile.prpsinfoCorefile.prstatusCorefile.registersCorefile.siginfoCorefile.signalCorefile.spCorefile.stackCorefile.vdsoCorefile.vsyscallCorefile.vvar
Mapping