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

Unable to unpack due to invalid memory write #52

Open
gcarlos64 opened this issue Feb 17, 2024 · 0 comments
Open

Unable to unpack due to invalid memory write #52

gcarlos64 opened this issue Feb 17, 2024 · 0 comments

Comments

@gcarlos64
Copy link

Hi, I'm facing this when trying to unpack an ASPack executable:

+$ unipacker
 _   _         __  _  __                    _       v1.0.7
| | | |       / / (_) \ \                  | |
| | | |_ __  | |   _   | | _ __   __ _  ___| | _____ _ __
| | | | '_ \/ /   | |   \ \ '_ \ / _` |/ __| |/ / _ \ '__|
| |_| | | | \ \   | |   / / |_) | (_| | (__|   <  __/ |
 \___/|_| |_|| |  |_|  | || .__/ \__,_|\___|_|\_\___|_|
              \_\     /_/ | |
                          |_|
Your options for today:

        [0]  ASPack:        main.exe.vpn
        [1]  New sample...

+Enter the option ID: 0

Next up: Sample: [ASPack] main.exe.vpn
Traceback (most recent call last):
  File "/home/mim/projects/gc/gc2-client/venv/bin/unipacker", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/mim/projects/gc/gc2-client/venv/lib/python3.11/site-packages/unipacker/shell.py", line 786, in main
    Shell()
  File "/home/mim/projects/gc/gc2-client/venv/lib/python3.11/site-packages/unipacker/shell.py", line 89, in __init__
    self.sample_loop()
  File "/home/mim/projects/gc/gc2-client/venv/lib/python3.11/site-packages/unipacker/shell.py", line 121, in sample_loop
    self.init_engine()
  File "/home/mim/projects/gc/gc2-client/venv/lib/python3.11/site-packages/unipacker/shell.py", line 135, in init_engine
    self.engine = UnpackerEngine(self.sample, "unpacked.exe")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mim/projects/gc/gc2-client/venv/lib/python3.11/site-packages/unipacker/core.py", line 159, in __init__
    self.init_uc()
  File "/home/mim/projects/gc/gc2-client/venv/lib/python3.11/site-packages/unipacker/core.py", line 519, in init_uc
    curr_hook_addr = self.apicall_handler.add_hook(self.uc, func_name, dll_name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mim/projects/gc/gc2-client/venv/lib/python3.11/site-packages/unipacker/apicalls.py", line 412, in add_hook
    uc.mem_write(curr_hook_addr, hexstr)
  File "/home/mim/projects/gc/gc2-client/venv/lib/python3.11/site-packages/unicorn/unicorn.py", line 443, in mem_write
    raise UcError(status)
unicorn.unicorn.UcError: Invalid memory write (UC_ERR_WRITE_UNMAPPED)
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

1 participant