Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method implementation request #11

Open
cperdana opened this issue Aug 3, 2012 · 0 comments
Open

method implementation request #11

cperdana opened this issue Aug 3, 2012 · 0 comments
Assignees

Comments

@cperdana
Copy link

cperdana commented Aug 3, 2012

Hi,
This is requesting to add new method to class Emulator.
These method will allow me execute shellcode without depending on test(steps) function.

def create_new_env(self):
    self._env = emu_env_new(self._emu)
    self._env.profile = emu_profile_new()


def env_linux_syscall_check_using_class_env(self):
    if self._env is NULL:
        print emu_strerror(self._emu)
        raise RuntimeError('Emulator environment error')

    #  hook = emu_env_linux_syscall_check(_env)
    if emu_env_linux_syscall_check(self._env) is NULL:
        return False

    return True

With above method, the shellcode can be emulate as follow:

    emu.create_new_env()

    for x in range (12):
        if emu.env_w32_hook_check_using_class_env() == True:
            print " eip is a hook function",
        else:
            emu.cpu_debugflag_set(1)
            ret = emu.cpu_parse()
            emu.cpu_debugflag_unset(1)
            if ret != -1:
                instr = emu.cpu_get_cpu_instr_string()
                print instr

                emu.cpu_step()
            else:
                x = "break"
@buffer buffer self-assigned this Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants