ThePorgs / Exegol-images

Docker images of the Exegol project
https://exegol.readthedocs.io/
GNU General Public License v3.0
87 stars 68 forks source link

[BUG] autorecon, oscanner and tnscmd10g missing tools #127

Closed lap1nou closed 1 year ago

lap1nou commented 1 year ago

Describe the bug

Hello,

When you run autorecon, it trigger an error:

[!] [oracle-scanner] The oscanner program could not be found. Make sure it is installed. (On Kali, run: sudo apt install oscanner)

This could be fixed by installing oscanner but it is not available in the current source repos (Debian I believe), so we can temporarily add Kali repos, install the tool and then remove it.

I can do the PR quick, I just want to know if someone has a better solution, this would imply temporarily adding a GPG key and a repository and also install 2 packages: oscanner and tnscmd10g.

Steps To Reproduce

  1. Create an Exegol container
  2. Run autorecon 127.0.0.1

Exegol Wrapper Version

[*] Exegol is currently in version v4.1.1
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[+] We thank Capgemini for supporting the project (helping with dev) 🙏                                                                                                                                                                     
[+] We thank HackTheBox for sponsoring the multi-arch support 💚                                                                                                                                                                            
[D] Pip installation: Off 🪓                                                                                                                                                                                                                
[D] Git source installation: Off 🪓                                                                                                                                                                                                         
[D] Host OS: Linux                                                                                                                                                                                                                          
[D] Arch: amd64                                                                                                                                                                                                                             
[D] Raw arch: x86_64                                                                                                                                                                                                                        
[D] Docker desktop: Off 🪓                                                                                                                                                                                                                  
[D] Shell type: Linux                                                                                                                                                                                                                       
[D] Last update check: 26/03/2023

### Exegol container information

```Text
[*] Exegol is currently in version v4.1.1
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[+] We thank Capgemini for supporting the project (helping with dev) 🙏                                                                                                                                                                     
[+] We thank HackTheBox for sponsoring the multi-arch support 💚                                                                                                                                                                            
[V] Listing user configurations                                                                                                                                                                                                             

🧠 User configurations                              
┌──────────────────────────────────────────────────┐
│ User config file: /root/.exegol/config.yml       │
│ Private workspace: /root/.exegol/workspaces      │
│ Exegol resources: /root/.exegol/exegol-resources │
│ My resources: /root/.exegol/my-resources         │
│ Auto-check updates: On ✔                         │
│ Auto-remove images: On ✔                         │
│ Auto-update fs: Off 🪓                           │
│ Default start shell: zsh                         │
│ Shell logging method: asciinema                  │
│ Shell logging compression: On ✔                  │
└──────────────────────────────────────────────────┘

[V] Listing git repositories                                                                                                                                                                                                                
[!] Exegol has not been installed via git clone. Skipping wrapper auto-update operation.                                                                                                                                                    
[!] Exegol has not been installed via git clone. Skipping wrapper auto-update operation.                                                                                                                                                    

🐙 Project modules                            
┌───────────┬───────────────┬────────────────┐
│ Name      │ Status        │ Current branch │
├───────────┼───────────────┼────────────────┤
│ Wrapper   │ Not installed │ ? 🤷           │
│ Images    │ Not installed │ ? 🤷           │
│ Resources │ Up to date    │ main           │
└───────────┴───────────────┴────────────────┘

⭐ Container summary                                                                    
┌──────────────────┬───────────────────────────────────────────────────────────────────┐
│             Name │ full                                                              │
│            Image │ full - v.3.0.1 (Up to date) (amd64)                               │
├──────────────────┼───────────────────────────────────────────────────────────────────┤
│    Creation date │ 29/03/2023 17:09                                                  │
│              GUI │ On ✔                                                              │
│          Network │ host                                                              │
│         Timezone │ On ✔                                                              │
│ Exegol resources │ On ✔ (/opt/resources)                                             │
│     My resources │ On ✔ (/opt/my-resources)                                          │
│    Shell logging │ Off 🪓                                                            │
│       Privileged │ Off ✔                                                             │
│        Workspace │ Dedicated (/workspace)                                            │
│             Envs │ DISPLAY=:0.0                                                      │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1                                     │
│                  │ QT_X11_NO_MITSHM=1                                                │
│                  │ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin │
│          Volumes │ /etc/localtime ➡ /etc/localtime (RO)                              │
│                  │ /etc/timezone ➡ /etc/timezone (RO)                                │
│                  │ /root/.exegol/my-resources ➡ /opt/my-resources                    │
│                  │ /root/.exegol/exegol-resources ➡ /opt/resources                   │
│                  │ /tmp/.X11-unix ➡ /tmp/.X11-unix                                   │
│                  │ /root/.exegol/workspaces/full ➡ /workspace                        │
└──────────────────┴───────────────────────────────────────────────────────────────────┘


### Exception

_No response_

### Additional context

_No response_

### Anything else?

_No response_
iNoSec2 commented 1 year ago

Honestly i didnt found any better solutions than adding kali repo but i found the idea of basing exegol on debian the most fucked up idea, debian is the most buggy distro on the whole linux distro panel... This is a docker for pentesting so using a vanilla kali like they offer or ubuntu (less buggy than debain...) and installing all the needed tools would be a far better idea.

I know plenty of professionnal who tried exegol and really loved the idea like i do but the gave up due to the debian image used, too much problems...

ShutdownRepo commented 1 year ago

@Dramelac will make a lenghtier response, but first of all, chill out. This is a community project. The most fucked up idea was made with a good heart by people that'd like to make things progress. We did move from kali to debian because of stability and because their tools were not up-to-dates, conflicting libs, etc. Using Debian was an improvement. People that got problems with it can raise issues. If Kali was the solution, Exegol wouldn't exist.

Dramelac commented 1 year ago

Hello @iNoSec2

Sorry to hear that everything is not going well with the Debian base.

We have not received any feedback / bug pointing to that, feel free to create issues to report problems and we do our best to solve them. If indeed we were to encounter a blocking / recurring problem, where Debian is the root cause, we'd change the Debian base.

Dramelac commented 1 year ago

Regarding your issue @lap1nou, thanks for your feedback, we'll look into it and let you know the appropriate solution.

Do you know if there is a source repo from which we can install / compile the package and dependencies to install an up-to-date version in exegol rather than relying on potentially obsolete packages in the kali repo?

If we can't find a better solution or alternative we can use the kali repo as a last resort

lap1nou commented 1 year ago

Hey @Dramelac, @ShutdownRepo,

Thank you for your answers, as I understood it, these two tools are pretty old and doesn't seems to be maintened anymore.

oscanner original URL seems to be http://www.cqure.net/wp/oscanner/ but it's dead now, the only repo I could find was the Kali one (https://gitlab.com/kalilinux/packages/oscanner/-/tree/kali/master/), but there is only the .jar and not the source code (!).

For tnscmd10g, I found the source code here: https://gitlab.com/kalilinux/packages/tnscmd10g/-/tree/kali/master/ again on the Kali repos, the tool is also really old (10 years), but at least this time we got the source code.

These 2 tools annoy me a bit since I don't know if they are really useful otherwise, maybe we should modify autorecon instead, right now there is the possibility to skip some scan, but it still ask for the tools to be installed as I checked in the source code (it use the which module in Python if I remember correctly).

We could also trick autorecon that these two commands are installed by simply putting an empty binary named tnscmd10g and oscanner on the $PATH.

iNoSec2 commented 1 year ago

@Dramelac will make a lenghtier response, but first of all, chill out. This is a community project. The most fucked up idea was made with a good heart by people that'd like to make things progress. We did move from kali to debian because of stability and because their tools were not up-to-dates, conflicting libs, etc. Using Debian was an improvement. People that got problems with it can raise issues. If Kali was the solution, Exegol wouldn't exist.

It seems you are the one who must chilll out 😂 i dont see the point by saying if kali was the solution exegol wouldnt exist Kali was made with good heart by people that'd like to make things progress. Debian is not known to be a stable released btw i will not go further in a distro "debate" since nobody cares and the issue will be more poluted than now. Have a good day and chill

Dramelac commented 1 year ago

It seems you are the one who must chilll out joy i dont see the point by saying if kali was the solution exegol wouldnt exist Kali was made with good heart by people that'd like to make things progress. Debian is not known to be a stable released btw i will not go further in a distro "debate" since nobody cares and the issue will be more poluted than now. Have a good day and chill

We don't need to "debate" on "known" things, if you concretely encounter bugs, errors or instabilities, let us know and bring us these elements (if possible reproducible or with the context elements) as you find them with GitHub issues. This approach will help the project to evolve in the right direction.

QU35T-code commented 1 year ago

Hey, @Dramelac, @lap1nou, @iNoSec2 and @ShutdownRepo,

I made a pull request which should fix the problem. Tell me if that's okay with you.

https://github.com/ThePorgs/Exegol-images/pull/135