Jump to content

enddo

Members
  • Posts

    3
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by enddo

  1. The HatDBG is A pure Powershell win32 debugging abstraction class.The goal of this project is to make a powershell debugger. This is exclusively for educational purposes.

    URL: https://github.com/enddo/HatDBG

    Enumerate Threads

    #Use PID for attach debugger
    $result = attach -dwpid 5920
    if([bool] $result)
    {
    $list = enumerate_threads
    foreach ($thread in $list){
        $thread_context = get_thread_context -thread_id $thread
        write-host ("[+] Dumping register for thread ID: 0x{0,0:x}" -f $thread)
        write-host ("[+] EIP: 0x{0,0:x}" -f $thread_context.Eip)
        write-host ("[+] ESP: 0x{0,0:x}" -f $thread_context.Esp)
        write-host ("[+] EBP: 0x{0,0:x}" -f $thread_context.Ebp)
        write-host ("[+] EAX: 0x{0,0:x}" -f $thread_context.Eax)
        write-host ("[+] EBX: 0x{0,0:x}" -f $thread_context.Ebx)
        write-host ("[+] ECX: 0x{0,0:x}" -f $thread_context.Ecx)
        write-host ("[+] EDX: 0x{0,0:x}" -f $thread_context.Edx)
        write-host "[+] END DUMP"
    }
    $result = detach
    }
    

    Output

    [*] Debugger Attached to PID 5920
    [+] Dumping register for thread ID: 0xb14
    [+] EIP: 0x75ca4d9c
    [+] ESP: 0x53f610
    [+] EBP: 0x53f628
    [+] EAX: 0x4d3
    [+] EBX: 0x0
    [+] ECX: 0x0
    [+] EDX: 0x0
    [+] END DUMP
    [+] Dumping register for thread ID: 0x1834
    [+] EIP: 0x77e08c0c
    [+] ESP: 0x31dfb70
    [+] EBP: 0x31dfbe0
    [+] EAX: 0xf5a280
    [+] EBX: 0x2be8c7c
    [+] ECX: 0x0
    [+] EDX: 0x0
    [+] END DUMP
    [+] Dumping register for thread ID: 0x1770
    [+] EIP: 0x77e0919c
    [+] ESP: 0x32df5a8
    [+] EBP: 0x32df738
    [+] EAX: 0x0
    [+] EBX: 0x0
    [+] ECX: 0x0
    [+] EDX: 0x0
    [+] END DUMP
    [+] Dumping register for thread ID: 0x1784
    [+] EIP: 0x77e08c0c
    [+] ESP: 0x4defc14
    [+] EBP: 0x4defc84
    [+] EAX: 0xf5a280
    [+] EBX: 0x3e8
    [+] ECX: 0x0
    [+] EDX: 0x0
    [+] END DUMP
    [+] Dumping register for thread ID: 0x133c
    [+] EIP: 0x77e0919c
    [+] ESP: 0x500f7f0
    [+] EBP: 0x500f980
    [+] EAX: 0x103
    [+] EBX: 0x0
    [+] ECX: 0x0
    [+] EDX: 0x0
    [+] END DUMP
    [+] Dumping register for thread ID: 0x1718
    [+] EIP: 0x77e08c0c
    [+] ESP: 0x778fb9c
    [+] EBP: 0x778fc0c
    [+] EAX: 0x0
    [+] EBX: 0xcc0008
    [+] ECX: 0x0
    [+] EDX: 0x0
    [+] END DUMP
    [+] Dumping register for thread ID: 0x23b8
    [+] EIP: 0x77e0aef0
    [+] ESP: 0x2dcf850
    [+] EBP: 0x0
    [+] EAX: 0x77e41300
    [+] EBX: 0x0
    [+] ECX: 0x0
    [+] EDX: 0x0
    [+] END DUMP
    [*] Finished debugging.
    

    Get Debug Event Code

    $dwpid = Read-Host "Enter the PID of the Process to attach to"
    attach -dwpid $dwpid
    run
    detach
    

    Output

    Enter the PID of the Process to attach to: : 3168
    [*] Debugger Attached to PID 3168
    [+] Event Code: 3 Thread ID: 5056
    [+] Event Code: 6 Thread ID: 5056
    [+] Event Code: 2 Thread ID: 8340
    [+] Event Code: 2 Thread ID: 10020
    [+] Event Code: 2 Thread ID: 4788
    [+] Event Code: 2 Thread ID: 7572
    [+] Event Code: 2 Thread ID: 128
    [+] Event Code: 2 Thread ID: 7760
    [+] Event Code: 2 Thread ID: 9552
    [+] Event Code: 2 Thread ID: 4676
    [+] Event Code: 2 Thread ID: 4516
    [+] Event Code: 2 Thread ID: 8704
    [+] Event Code: 2 Thread ID: 6016
    [+] Event Code: 2 Thread ID: 8556
    [+] Event Code: 2 Thread ID: 8968
    [+] Event Code: 2 Thread ID: 8204
    [+] Event Code: 2 Thread ID: 5444
    

    Set Breakpoint

    $dwpid = Read-Host "Enter the PID of the Process to attach to"
    attach -dwpid $dwpid
    $address = func_resolve -dll "msvcrt.dll" -func "printf"
    bp_set -address $address
    run
    
    detach
    

    Output

    Enter the PID of the Process to attach to: 4644
    [*] Debugger Attached to PID 4644
    [*] Set Breakpoint at 0x00116046
    [+] Event Code: 3 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 2 Thread ID: 3268
    [+] Event Code: 2 Thread ID: 9864
    [+] Event Code: 2 Thread ID: 9700
    [+] Event Code: 2 Thread ID: 6600
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 6 Thread ID: 7740
    [+] Event Code: 2 Thread ID: 7288
    [+] Event Code: 1 Thread ID: 7288
    [+] Exception address: 0x00116046
    [+] Event Code: 4 Thread ID: 7288
    
    • Upvote 1
  2. CJExploiter

    CJExploiter is drag and drop ClickJacking exploit development assistance tool. First open the "index.html" with your browser locally and enter target URL and click on "View Site". You can dynamically create your own inputs. Finally by click the "Exploit It" you can see the P0C.

    Feel free to make pull requests, if there's anything you feel we could do better.

    ScreenShot

    Summery

    Clickjacking, also known as a "UI redress attack", is when an attacker uses multiple transparent or opaque layers to trick a user into clicking on a button or link on another page when they were intending to click on the the top level page. Thus, the attacker is "hijacking" clicks meant for their page and routing them to another page, most likely owned by another application, domain, or both.

    Using a similar technique, keystrokes can also be hijacked. With a carefully crafted combination of stylesheets, iframes, and text boxes, a user can be led to believe they are typing in the password to their email or bank account, but are instead typing into an invisible frame controlled by the attacker. OWASP

    You can use this tool to generate dynamic P0C.

    • Upvote 3
  3. A curated list of awesome Windows Exploitation resources, and shiny things.

    Table of Contents

    Windows stack overflows

    Stack Base Overflow Articles.

    Windows heap overflows

    Heap Base Overflow Articles.

    Kernel based Windows overflows

    Kernel Base Exploit Development Articles.

    Windows memory protections

    Windows memory protections Introduction Articles.

    Bypassing filter and protections

    Windows memory protections Bypass Methods Articles.

    Typical windows exploits

    Exploit development tutorial series

    Exploid Development Tutorial Series Base on Windows Operation System Articles.

    Tools

    Disassemblers, debuggers, and other static and dynamic analysis tools.

    • angr - Platform-agnostic binary analysis framework developed at UCSB's Seclab.
    • BARF - Multiplatform, open source Binary Analysis and Reverse engineering Framework.
    • binnavi - Binary analysis IDE for reverse engineering based on graph visualization.
    • Bokken - GUI for Pyew and Radare.
    • Capstone - Disassembly framework for binary analysis and reversing, with support for many architectures and bindings in several languages.
    • codebro - Web based code browser using clang to provide basic code analysis.
    • dnSpy - .NET assembly editor, decompiler and debugger.
    • Evan's Debugger (EDB) - A modular debugger with a Qt GUI.
    • GDB - The GNU debugger.
    • GEF - GDB Enhanced Features, for exploiters and reverse engineers.
    • hackers-grep - A utility to search for strings in PE executables including imports, exports, and debug symbols.
    • IDA Pro - Windows disassembler and debugger, with a free evaluation version.
    • Immunity Debugger - Debugger for malware analysis and more, with a Python API.
    • ltrace - Dynamic analysis for Linux executables.
    • objdump - Part of GNU binutils, for static analysis of Linux binaries.
    • OllyDbg - An assembly-level debugger for Windows executables.
    • PANDA - Platform for Architecture-Neutral Dynamic Analysis
    • PEDA - Python Exploit Development Assistance for GDB, an enhanced display with added commands.
    • pestudio - Perform static analysis of Windows executables.
    • Process Monitor - Advanced monitoring tool for Windows programs.
    • Pyew - Python tool for malware analysis.
    • Radare2 - Reverse engineering framework, with debugger support.
    • SMRT - Sublime Malware Research Tool, a plugin for Sublime 3 to aid with malware analyis.
    • strace - Dynamic analysis for Linux executables.
    • Udis86 - Disassembler library and tool for x86 and x86_64.
    • Vivisect - Python tool for malware analysis.
    • X64dbg - An open-source x64/x32 debugger for windows.
    • Upvote 1
×
×
  • Create New...