CISSP Prep: Ch 5. Communication and Network Security (Part 2)Sam Bowne
This document provides an overview of networking concepts related to communication and network security. It discusses common cabling types used to physically connect networks like twisted pair, coaxial, fiber optic and their characteristics. It also covers common LAN technologies and protocols like Ethernet, token ring, FDDI, physical network topologies and WAN protocols. The document then discusses wireless LANs, Bluetooth, RFID and secure network devices like switches, routers, firewalls and routing protocols.
CISSP Prep: Ch 1: Security Governance Through Principles and PoliciesSam Bowne
The document outlines key principles of security governance, focusing on the CIA triad: confidentiality, integrity, and availability, along with necessary controls and measures to protect data. It emphasizes the roles, responsibilities, and frameworks for managing information security within organizations, including the importance of policies, standards, and governance structures. Additionally, it discusses the significance of change management, data classification, and threat modeling to ensure robust security practices and compliance.
Windows 10 Nt Heap Exploitation (Chinese version)Angel Boy
The document discusses Windows memory allocation and the NT heap. It describes the core data structures used, including the _HEAP, _HEAP_ENTRY chunks, and _HEAP_LIST_LOOKUP BlocksIndex. It explains how allocated, freed, and VirtualAlloc chunks are structured and managed in the Back-End, including using freelist chains and BlocksIndex to efficiently service allocation requests.
Windows 10 Nt Heap Exploitation (English version)Angel Boy
The document discusses the Windows memory allocator and heap exploitation. It describes the core components and data structures of the NT heap, including the _HEAP structure, _HEAP_ENTRY chunks, BlocksIndex structure, and FreeLists. It also explains the differences between the backend and frontend allocators as well as how chunks of different sizes are managed.
MacOS memory allocator (libmalloc) ExploitationAngel Boy
The document discusses the memory allocator libmalloc used in MacOS. It details the data structures used to manage tiny chunks of memory less than 1008 bytes, including blocks, chunks, magazines, free lists, bitmaps and regions. The mechanism of allocating, freeing and caching tiny chunks is also described.
The document provides an overview of various exploitation techniques, particularly focusing on buffer overflows, return-oriented programming (ROP), and return-to-libc attacks. It discusses methods for manipulating the stack, executing shellcode, and mitigating measures like Data Execution Prevention (DEP) and Address Space Layout Randomization (ASLR). Additionally, it includes tools for exploiting vulnerabilities and highlights advanced topics like sigreturn-oriented programming (SROP).
Play with FILE Structure - Yet Another Binary Exploit TechniqueAngel Boy
The document discusses exploiting the FILE structure in C programs. It provides an overview of how file streams and the FILE structure work. Key points include that the FILE structure contains flags, buffers, a file descriptor, and a virtual function table. It describes how functions like fopen, fread, and fwrite interact with the FILE structure. It then discusses potential exploitation techniques like overwriting the virtual function table or FILE's linked list to gain control of program flow. It notes defenses like vtable verification implemented in modern libc libraries.
The document discusses C++ exploitation techniques including name mangling, virtual function tables, vtable hijacking, vectors, strings, and memory allocation/deallocation functions like new and delete. It provides details on how virtual function tables are used to implement polymorphism in C++ and how vtable hijacking can be used to exploit vulnerabilities by forcing a vtable and hijacking the virtual function pointer to call shellcode. It also explains how vectors and strings are implemented dynamically in memory and their memory layout.
Linux Binary Exploitation - Return-oritend ProgramingAngel Boy
The document discusses using return-oriented programming (ROP) to bypass address space layout randomization (ASLR) and data execution prevention (DEP). It describes using the procedure linkage table (PLT) to leak the address of functions like puts to bypass ASLR. A ROP chain is then constructed to call read to read "/bin/sh" into memory and execute it, achieving arbitrary code execution.
Modern Kernel Pool Exploitation: Attacks and TechniquesMichael Scovetta
The document discusses modern techniques for exploiting vulnerabilities in the Windows kernel memory pool. It provides an overview of the kernel pool structures and internals in Windows 7 and earlier versions. Specific topics covered include the pool descriptor, pool headers, free lists, lookaside lists, large allocations, and the use of bitmaps. The goal is to identify weaknesses that can be leveraged for privilege escalation attacks.
[若渴計畫] Challenges and Solutions of Window Remote ShellcodeAj MaChInE
This document discusses challenges and solutions related to window remote shellcode. It outlines challenges posed by antivirus software, EMET, firewalls, and IDS/IPS systems. It then describes various techniques for bypassing these protections, such as encryption, obfuscation, non-standard programming languages, and the use of tools like Meterpreter and Veil Framework payloads. Specific bypass techniques covered include DLL injection, process hollowing, reflective loading, and the use of techniques like one-way shells and HTTP stagers.
This document discusses reverse engineering techniques including bypassing hackshield, analyzing Windows binaries with IDA Pro and Ollydbg, unpacking binaries with UPX and protecting binaries with encryption and anti-debugging techniques. It also covers basic x86 assembly instructions and reversing concepts like the stack, registers, and anti-debugging APIs.
The document provides an introduction to debuggers, focusing on using gdb to debug a simple C program called crash1.c that has two bugs. It explains how to compile the program with debugging information, run it in gdb, and diagnose the segmentation fault that occurs when the program is executed without command line arguments. The guide details the use of various gdb commands to inspect the state of the program and locate errors, emphasizing the importance of proper compilation for effective debugging.
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxData
The document discusses updates to InfluxDB IOx, a new columnar time series database. It covers changes and improvements to the API, CLI, query capabilities, and path to open sourcing builds. Key points include moving to gRPC for management, adding PostgreSQL string functions to queries, optimizing functions for scalar values and columns, and monitoring internal systems as the first step to releasing open source builds.
This document discusses tracing in the Linux kernel. It describes various tracing mechanisms like ftrace, tracepoints, kprobes, perf, and eBPF. Ftrace allows tracing functions via compiler instrumentation or dynamically. Tracepoints define custom trace events that can be inserted at specific points. Kprobes and related probes like jprobes allow tracing kernel functions. Perf provides performance monitoring capabilities. eBPF enables custom tracing programs to be run efficiently in the kernel via just-in-time compilation. Tracing tools like perf, systemtap, and LTTng provide user interfaces.
The document provides an overview of basic penetration testing techniques including buffer overflow vulnerabilities, return oriented programming (ROP), format string vulnerabilities, and ways to bypass data execution prevention (DEP) and address space layout randomization (ASLR). It discusses stack-based buffer overflows, the structure of the x86 stack, overwriting the return address, and controlling the instruction pointer. It also covers ROP techniques like ret2libc, gadgets, chaining, and using libc functions. Finally, it briefly mentions tools like pwntools, ROPgadget, and techniques like IO wrapping and LD_PRELOAD hijacking.
Understanding a kernel oops and a kernel panicJoseph Lu
This document discusses Linux kernel oops and kernel panics. It explains that a kernel oops occurs when there is an illegal instruction or illegal memory access in kernel space, and will kill the offending process to keep the system running. A kernel panic means the system must stop immediately. Kernel oops can be caused by illegal instructions, unrecognized system calls, undefined CPU instructions, unknown data aborts, or prefetch aborts. These result in a call to the arm_notify_die() function and generate an oops. Illegal instructions that handle interrupt vectors can cause a panic directly. A kernel panic performs further actions like console output and stopping other CPUs before restarting or halting the system. Methods to capture crash
The document provides an overview of various exploitation techniques, particularly focusing on buffer overflows, return-oriented programming (ROP), and return-to-libc attacks. It discusses methods for manipulating the stack, executing shellcode, and mitigating measures like Data Execution Prevention (DEP) and Address Space Layout Randomization (ASLR). Additionally, it includes tools for exploiting vulnerabilities and highlights advanced topics like sigreturn-oriented programming (SROP).
Play with FILE Structure - Yet Another Binary Exploit TechniqueAngel Boy
The document discusses exploiting the FILE structure in C programs. It provides an overview of how file streams and the FILE structure work. Key points include that the FILE structure contains flags, buffers, a file descriptor, and a virtual function table. It describes how functions like fopen, fread, and fwrite interact with the FILE structure. It then discusses potential exploitation techniques like overwriting the virtual function table or FILE's linked list to gain control of program flow. It notes defenses like vtable verification implemented in modern libc libraries.
The document discusses C++ exploitation techniques including name mangling, virtual function tables, vtable hijacking, vectors, strings, and memory allocation/deallocation functions like new and delete. It provides details on how virtual function tables are used to implement polymorphism in C++ and how vtable hijacking can be used to exploit vulnerabilities by forcing a vtable and hijacking the virtual function pointer to call shellcode. It also explains how vectors and strings are implemented dynamically in memory and their memory layout.
Linux Binary Exploitation - Return-oritend ProgramingAngel Boy
The document discusses using return-oriented programming (ROP) to bypass address space layout randomization (ASLR) and data execution prevention (DEP). It describes using the procedure linkage table (PLT) to leak the address of functions like puts to bypass ASLR. A ROP chain is then constructed to call read to read "/bin/sh" into memory and execute it, achieving arbitrary code execution.
Modern Kernel Pool Exploitation: Attacks and TechniquesMichael Scovetta
The document discusses modern techniques for exploiting vulnerabilities in the Windows kernel memory pool. It provides an overview of the kernel pool structures and internals in Windows 7 and earlier versions. Specific topics covered include the pool descriptor, pool headers, free lists, lookaside lists, large allocations, and the use of bitmaps. The goal is to identify weaknesses that can be leveraged for privilege escalation attacks.
[若渴計畫] Challenges and Solutions of Window Remote ShellcodeAj MaChInE
This document discusses challenges and solutions related to window remote shellcode. It outlines challenges posed by antivirus software, EMET, firewalls, and IDS/IPS systems. It then describes various techniques for bypassing these protections, such as encryption, obfuscation, non-standard programming languages, and the use of tools like Meterpreter and Veil Framework payloads. Specific bypass techniques covered include DLL injection, process hollowing, reflective loading, and the use of techniques like one-way shells and HTTP stagers.
This document discusses reverse engineering techniques including bypassing hackshield, analyzing Windows binaries with IDA Pro and Ollydbg, unpacking binaries with UPX and protecting binaries with encryption and anti-debugging techniques. It also covers basic x86 assembly instructions and reversing concepts like the stack, registers, and anti-debugging APIs.
The document provides an introduction to debuggers, focusing on using gdb to debug a simple C program called crash1.c that has two bugs. It explains how to compile the program with debugging information, run it in gdb, and diagnose the segmentation fault that occurs when the program is executed without command line arguments. The guide details the use of various gdb commands to inspect the state of the program and locate errors, emphasizing the importance of proper compilation for effective debugging.
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...InfluxData
The document discusses updates to InfluxDB IOx, a new columnar time series database. It covers changes and improvements to the API, CLI, query capabilities, and path to open sourcing builds. Key points include moving to gRPC for management, adding PostgreSQL string functions to queries, optimizing functions for scalar values and columns, and monitoring internal systems as the first step to releasing open source builds.
This document discusses tracing in the Linux kernel. It describes various tracing mechanisms like ftrace, tracepoints, kprobes, perf, and eBPF. Ftrace allows tracing functions via compiler instrumentation or dynamically. Tracepoints define custom trace events that can be inserted at specific points. Kprobes and related probes like jprobes allow tracing kernel functions. Perf provides performance monitoring capabilities. eBPF enables custom tracing programs to be run efficiently in the kernel via just-in-time compilation. Tracing tools like perf, systemtap, and LTTng provide user interfaces.
The document provides an overview of basic penetration testing techniques including buffer overflow vulnerabilities, return oriented programming (ROP), format string vulnerabilities, and ways to bypass data execution prevention (DEP) and address space layout randomization (ASLR). It discusses stack-based buffer overflows, the structure of the x86 stack, overwriting the return address, and controlling the instruction pointer. It also covers ROP techniques like ret2libc, gadgets, chaining, and using libc functions. Finally, it briefly mentions tools like pwntools, ROPgadget, and techniques like IO wrapping and LD_PRELOAD hijacking.
Understanding a kernel oops and a kernel panicJoseph Lu
This document discusses Linux kernel oops and kernel panics. It explains that a kernel oops occurs when there is an illegal instruction or illegal memory access in kernel space, and will kill the offending process to keep the system running. A kernel panic means the system must stop immediately. Kernel oops can be caused by illegal instructions, unrecognized system calls, undefined CPU instructions, unknown data aborts, or prefetch aborts. These result in a call to the arm_notify_die() function and generate an oops. Illegal instructions that handle interrupt vectors can cause a panic directly. A kernel panic performs further actions like console output and stopping other CPUs before restarting or halting the system. Methods to capture crash
21. GDB - PEDA
• Some useful feature
• checksec : Check for various security options of binary
• elfsymbol : show elf .plt section
• vmmap : show memory mapping
• readelf : Get headers information from an ELF file
• find/searchmem : Search for a pattern in memory
• record : record every instruction at runtime
46. Binary Format
• 執⾏行行檔的格式會根據 OS 不同,⽽而有所不同
• Linux - ELF
• Windows - PE
• 在 Binary 的開頭會有個 magic number 欄欄位,⽅方便便讓 OS 辨認是屬於什什麼
樣類型的檔案
• 在 Linux 下可以使⽤用 file 來來檢視
55. Execution Flow
• How program maps to virtual memory.
• 在 program header 中
• 記錄著哪些 segment 應該 mapping 到什什麼位置,以及該 segment 的讀寫
執⾏行行權限
• 記錄哪些 section 屬於哪些 segment
• 當 program mapping 記憶體時會根據權限的不同來來分成好幾個 segment
• ⼀一個 segment 可以包含 0 個到多個 section
56. Execution Flow
• How program maps to virtual memory.
other section
.data
.bss
.got.plt
.rodata
.text
.init
ELF Header
In disk In memory
kernel space
CODE VMA
DATA VMA
HEAP
STACK
R or RX
RW
0x400000
0x601000
0x602000
0x7fffffffe520
57. Execution Flow
• How program maps to virtual memory.
• readelf -l binary
• 查看 program header
• readelf -S binary
• 查看 section header
• readelf -d binary
• 查看 dynamic section 內容
58. Execution Flow
• How program maps to virtual memory.
權限
mapping 位置
segment 中有哪些 section
59. Execution flow
• ld.so
• 載入 elf 所需的 shared library
• 這部分會記錄在 elf 中的 DT_NEED 中
• 初始化 GOT
• 其他相關初始化的動作
• ex : 將 symbol table 合併到 global symbol table 等等
• 對實際運作過程有興趣可參參考 elf/rtld.c
72. x64 assembly
• mov
• mov imm/reg/mem value to reg/mem
• mov A,B (move B to A)
• A 與 B 的 size 要相等
• ex :
• mov rax,rbx (o)
• mov rax,bx (x)
• mov rax,0xdeadbeef
73. x64 assembly
• add/sub/or/xor/and
• add/sub/or/xor/and reg,imm/reg
• add/sub/or/xor/and A,B
• A 與 B 的 size ⼀一樣要相等
• ex :
• add rbp,0x48
• sub rax,rbx
74. x64 assembly
• push/pop
• push/pop reg
• ex :
• push rax = sub rsp,8 ; mov [rsp],eax
• pop rbx = mov rbx,[rsp] ; add rsp,8