phra / PEzor

Open-Source Shellcode & PE Packer
https://iwantmore.pizza/posts/PEzor.html
GNU General Public License v3.0
1.81k stars 320 forks source link

Installation issue on latest Kali Linux #73

Closed mozg31337 closed 12 months ago

mozg31337 commented 2 years ago

Latest Kali with recent updates. Installing like:

$ git clone https://github.com/phra/PEzor.git 1 ⨯ $ cd PEzor $ sudo bash install.sh

Install the project... -- Install configuration: "Release" -- Installing: /usr/local/lib/pkgconfig/keystone.pc -- Installing: /usr/local/include/keystone -- Installing: /usr/local/include/keystone/arm64.h -- Installing: /usr/local/include/keystone/keystone.h -- Installing: /usr/local/include/keystone/arm.h -- Installing: /usr/local/include/keystone/x86.h -- Installing: /usr/local/include/keystone/hexagon.h -- Installing: /usr/local/include/keystone/ppc.h -- Installing: /usr/local/include/keystone/evm.h -- Installing: /usr/local/include/keystone/mips.h -- Installing: /usr/local/include/keystone/systemz.h -- Installing: /usr/local/include/keystone/sparc.h -- Installing: /usr/local/lib/libkeystone.a -- Installing: /usr/local/bin/kstool go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'.

mozg31337 commented 2 years ago

A quick comment to follow up. It seems that the install script doesn't properly install/handle wclang, donut and sgn installation and/or PATHs to make sure PEzor runs properly. After the default install PEzor doesn't run correctly and complains about missing deps.

phra commented 2 years ago

from the output that you pasted the problem seems quite explicit and related to sgn installation:

go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.

see https://github.com/phra/PEzor/blob/master/install.sh#L37

Kucharskov commented 2 years ago

Im already trying to fix working of PEzor... To fix that install.sh#L37 it should be like that: go install github.com/EgeBalci/sgn@latest &&

Then installation finishes propelly

rockabillycat666 commented 1 year ago

I am having exactly the same issue. The "go install github.com/EgeBalci/sgn@latest &&" is not working on my end


┌──(kali㉿kali)-[~/Toys/PEzor]
└─$ sudo go install github.com/EgeBalci/sgn@latest

┌──(kali㉿kali)-[~/Toys/PEzor]
└─$ 

I am definitely still unable to run it.

< PEzor!! v3.1.2 >
 ----------------
      \                    / \  //\
       \    |\___/|      /   \//  \\
            /0  0  \__  /    //  | \ \    
           /     /  \/_/    //   |  \  \  
           @_^_@'/   \/_   //    |   \   \ 
           //_^_/     \/_ //     |    \    \
        ( //) |        \///      |     \     \
      ( / /) _|_ /   )  //       |      \     _\
    ( // /) '/,_ _ _/  ( ; -.    |    _ _\.-~        .-~~~^-.
  (( / / )) ,-{        _      `-.|.-~-.           .~         `.
 (( // / ))  '/\      /                 ~-. _ .-~      .-~^-.  \
 (( /// ))      `.   {            }                   /      \  \
  (( / ))     .----~-.\        \-'                 .~         \  `. \^-.
             ///.----..>        \             _ -~             `.  ^-`  ^-_
               ///-._ _ _ _ _ _ _}^ - - - - ~                     ~-- ,.-~
                                                                  /.-~
---------------------------------------------------------------------------
Read the blog posts here:
https://iwantmore.pizza/posts/PEzor.html
https://iwantmore.pizza/posts/PEzor2.html
https://iwantmore.pizza/posts/PEzor3.html
https://iwantmore.pizza/posts/PEzor4.html
Based on:
https://github.com/TheWover/donut
https://github.com/EgeBalci/sgn
https://github.com/JustasMasiulis/inline_syscall
https://github.com/CylanceVulnResearch/ReflectiveDLLRefresher
---------------------------------------------------------------------------
sgn is missing from $PATH. Check https://github.com/EgeBalci/sgn to learn how to install it
gR0OT commented 1 year ago

I am having exactly the same issue. The "go install github.com/EgeBalci/sgn@latest &&" is not working on my end


┌──(kali㉿kali)-[~/Toys/PEzor]
└─$ sudo go install github.com/EgeBalci/sgn@latest

┌──(kali㉿kali)-[~/Toys/PEzor]
└─$ 

I am definitely still unable to run it.

< PEzor!! v3.1.2 >
 ----------------
      \                    / \  //\
       \    |\___/|      /   \//  \\
            /0  0  \__  /    //  | \ \    
           /     /  \/_/    //   |  \  \  
           @_^_@'/   \/_   //    |   \   \ 
           //_^_/     \/_ //     |    \    \
        ( //) |        \///      |     \     \
      ( / /) _|_ /   )  //       |      \     _\
    ( // /) '/,_ _ _/  ( ; -.    |    _ _\.-~        .-~~~^-.
  (( / / )) ,-{        _      `-.|.-~-.           .~         `.
 (( // / ))  '/\      /                 ~-. _ .-~      .-~^-.  \
 (( /// ))      `.   {            }                   /      \  \
  (( / ))     .----~-.\        \-'                 .~         \  `. \^-.
             ///.----..>        \             _ -~             `.  ^-`  ^-_
               ///-._ _ _ _ _ _ _}^ - - - - ~                     ~-- ,.-~
                                                                  /.-~
---------------------------------------------------------------------------
Read the blog posts here:
https://iwantmore.pizza/posts/PEzor.html
https://iwantmore.pizza/posts/PEzor2.html
https://iwantmore.pizza/posts/PEzor3.html
https://iwantmore.pizza/posts/PEzor4.html
Based on:
https://github.com/TheWover/donut
https://github.com/EgeBalci/sgn
https://github.com/JustasMasiulis/inline_syscall
https://github.com/CylanceVulnResearch/ReflectiveDLLRefresher
---------------------------------------------------------------------------
sgn is missing from $PATH. Check https://github.com/EgeBalci/sgn to learn how to install it

make sure you have sgn binary in your $PATH

easy example how to find it is

$ updatedb
$ locate  sgn
$ sudo ln -s /path/to/sgn/binary /usr/local/bin/sgn

for me it was located in ~/go/bin/sgn

Kucharskov commented 1 year ago

Guys! I stopped working on fixing the issues with PEzor. Even @phra do not response anymore... Your problems is caused by not reading explainations (eg just add go path to $PATH variable) and README.

Anyways even if you fix problem with PATH theres still some problem with deep dependencies and only working solution for me is just using dockerized version of a little bit older version of PEzor using: docker run -v /tmp/payload:/tmp/payloads -it thekingofduck/pezor /bin/bash just earlier create locally /tmp/payloads dir and use it to transfer obfuscated payloads between host and docker. Thats all!

phra commented 12 months ago

i have fixed the installation on latest kali, please have a look at the updated master branch.