Skip to content

Test mermaid

adfoster-r7 edited this page Feb 23, 2022 · 1 revision
sequenceDiagram
    actor user;

    msfconsole->>+meterpreter: load core library
    meterpreter-->>-msfconsole: return success and list of available commands

    msfconsole->>+meterpreter: get architecture from core library
    meterpreter-->>-msfconsole: e.g. Windows 10 x64 

    msfconsole->>+meterpreter: load stdapi as normal, without JNA/Railgun
    meterpreter->>meterpreter: Load new java commands
    meterpreter-->>-msfconsole: return success and list of available commands

    user->>+msfconsole:run post module: 

    msfconsole->>msfconsole: Load module, verify requirements

    opt If module requires Railgun, and session hasn't been sent Railgun/JNA before
        rect rgb(191, 223, 255, .1)
            msfconsole->>+meterpreter: load 'bigger' stdapi - i.e. classfiles + jna + railgun dll
            meterpreter->>meterpreter: Load new java commands
            note right of meterpreter: Keep JNA + Railgun library in memory<br />Don't load them yet
            meterpreter-->>-msfconsole: return success and list of available commands
        end
    end

    msfconsole->>+meterpreter: railgun call
    
    rect rgb(191, 223, 255, .1)
    note right of meterpreter: Load JNA if it's <br >not been loaded before
    meterpreter->>meterpreter: Copy JNA from classpath to file system
    meterpreter->>meterpreter: System.load(tempPath)
    meterpreter->>meterpreter: tempPath.deleteOnExit()
    end

    rect rgb(191, 223, 255, .1)
    note right of meterpreter: Load railgun if it's <br >not been loaded before
    meterpreter->>meterpreter: Use JNA to reflectively load railgun
    end

    meterpreter->>meterpreter: invoke railgun call
    meterpreter-->>-msfconsole: railgun result

    msfconsole-->>-user: Module results
Loading
Clone this wiki locally