Announcement

Collapse
No announcement yet.

Peaching a JAVA application

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Peaching a JAVA application

    Hi I kept getting control fault on iteration when i tried to peach a sample java application. The peach file (console.xml) is as follows:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Peach xmlns="http://peachfuzzer.com/2012/Peach" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://peachfuzzer.com/2012/Peach /peach/peach.xsd">
    
        <DataModel name="program">
            <String value="&quot;C:\Program Files\Java\jdk1.8\bin\java.exe&quot; SampleApp" mutable="false" />
        </DataModel>
    
        <DataModel name="space">
            <String value=" " mutable="false" />
        </DataModel>
    
    
        <DataModel name="parameter">
            <String value="112" />
        </DataModel>
    
        <StateModel name="State" initialState="Initial">
            <State name="Initial">
                <Action type="output">
                    <DataModel ref="program"/>
                </Action>
    
                <Action type="output">
                    <DataModel ref="space"/>
                </Action>
    
                <Action type="output">
                    <DataModel ref="parameter"/>
                </Action>
    
                <Action type="close" />
    
                <Action type="call" method="Runprogram" publisher="Peach.Agent"/>
            </State>
        </StateModel>
    
    
        <Agent name="LocalAgent">
            <Monitor class="WindowsDebugger">
                <Param name="CommandLine" value="call_console.bat"/>
                <Param name="WinDbgPath" value="C:\Program Files\Windows Kits\10\Debuggers\x64" />
                <Param name="StartOnCall" value="Runprogram"/>
                <Param name="NoCpuKill" value="true" />
                <Param name="WaitForExitOnCall" value="true" />
                <Param name="WaitForExitTimeout" value="-1" />
        </Monitor>
         </Agent>
    
    
        <Test name="Default">
    
            <Agent ref="LocalAgent" platform="windows"/>
    
            <StateModel ref="State"/>
    
            <Strategy class="Sequential"/>
    
            <Publisher class="File">
                <Param name="FileName" value="call_console.bat" />
            </Publisher>
    
            <Logger class="Filesystem">
                <Param name="Path" value="logs"/>
            </Logger>
        </Test>
    
    </Peach>
    <!-- end -->
    Contents of call_console.bat is as follows:
    Code:
    "C:\Program Files\Java\jre1.8.0_112\bin\java.exe" "HelloWorld" 112
    Peach is called in the directory (D:\Peach\JAVA\) which contains my java class as follows:
    D:\Peach\peach-3.1.124-win-x64-release\peach -debug -trace console.xml

    I did try running the call_console.bat directly in the windbg and it works.

    However it crashes with the following errors while running peach
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger LOAD_DLL_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger EXCEPTION_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger Pid: 7624, Exception: EXCEPTION_BREAKPOINT, First Chance, Not Continuable
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger LOAD_DLL_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger LOAD_DLL_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger LOAD_DLL_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger LOAD_DLL_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger CREATE_THREAD_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger LOAD_DLL_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger LOAD_DLL_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger LOAD_DLL_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger EXCEPTION_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger Pid: 7624, Exception: EXCEPTION_ACCESS_VIOLATION, First Chance, Not Continuable
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger EXIT_THREAD_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger EXIT_PROCESS_DEBUG_EVENT
    Peach.Core.Debuggers.WindowsSystem.SystemDebugger EXIT_PROCESS_DEBUG_EVENT
    Peach.Core.Agent.Monitors.WindowsDebuggerHybrid _StopDebugger
    Peach.Core.Agent.Agent DetectedFault
    Peach.Core.Agent.Monitors.WindowsDebuggerHybrid DetectedFault()
    Peach.Core.Agent.Monitors.WindowsDebuggerHybrid DetectedFault - Using system debugger, caught exception
    Peach.Core.Agent.AgentManager DetectedFault: True

    Any insights is greatly appreciated.

    Thank You

  • #2
    Hi all,

    Just to add, the java application is just a simple application, taking in an input argument from the command line and parsing it into an integer. Therefore in my example above, it should not crash as a number was passed in.

    any tips on what could have wrong?

    Thanks all in advance.

    Comment


    • #3
      Hi all,

      anybody have any insights to the problem?

      Much appreciated.

      Thank you.

      Comment

      Working...
      X