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

2021.2 VM Update script errors - sn0int update fails #114

Open
Hodgegoblin opened this issue Oct 24, 2021 · 2 comments
Open

2021.2 VM Update script errors - sn0int update fails #114

Hodgegoblin opened this issue Oct 24, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Hodgegoblin
Copy link
Collaborator

Describe the bug
Running update-current.sh in 2021.2 vm fails to update sn0int. Appears to be due to running cargo as sudo.

[+] Updating sn0int...                                                                                                                                                                                                 
remote: Enumerating objects: 189, done.                                                                                                                                                                                
remote: Counting objects: 100% (189/189), done.                                                                                                                                                                        
remote: Compressing objects: 100% (81/81), done.                                                                                                                                                                       
remote: Total 189 (delta 121), reused 167 (delta 106), pack-reused 0                                                                                                                                                   
Receiving objects: 100% (189/189), 84.42 KiB | 900.00 KiB/s, done.                                                                                                                                                     
Resolving deltas: 100% (121/121), completed with 63 local objects.                                                                                                                                                     
From https://github.com/kpcyrd/sn0int                                                                                                                                                                                  
 * branch            HEAD       -> FETCH_HEAD                                                                                                                                                                          
Updating 9f4914f..850d628                                                                                                                                                                                              
Fast-forward                                                                                                                                                                                                           
 .github/FUNDING.yml               |    1 +                                                                                                                                                                            
 Cargo.lock                        | 1115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------
 Cargo.toml                        |   29 +++--
 README.md                         |   24 ++--
 docs/reference.rst                |   33 ++++++
 modules/harness/img-hash.lua      |   11 ++
 sn0int-common/Cargo.toml          |    4 +-
 sn0int-common/src/lib.rs          |    2 -
 sn0int-common/src/metadata/mod.rs |   47 +++++---
 sn0int-registry/Cargo.toml        |    6 +-
 sn0int-std/Cargo.toml             |   13 +-
 sn0int-std/src/crt.rs             |    5 +-
 sn0int-std/src/crypto.rs          |    2 +-
 sn0int-std/src/engine/structs.rs  |   20 ++--
 sn0int-std/src/gfx/mod.rs         |   20 +++-
 sn0int-std/src/html.rs            |   10 +-
 sn0int-std/src/json.rs            |   25 ++--
 sn0int-std/src/sockets/mod.rs     |    4 +-
 sn0int-std/src/sockets/tls.rs     |    6 +-
 sn0int-std/src/web.rs             |   37 +++---
 sn0int-std/src/websockets.rs      |    8 +-
 src/args.rs                       |   13 +-
 src/autonoscope/domain.rs         |    6 +-
 src/autonoscope/ip.rs             |    6 +-
 src/autonoscope/mod.rs            |   36 +++---
 src/autonoscope/url.rs            |    6 +-
 src/cal/date.rs                   |   16 +--
 src/cal/time.rs                   |    2 +-
 src/cmd/add_cmd.rs                |    2 +-
 src/cmd/delete_cmd.rs             |   28 ++---
 src/cmd/pkg_cmd.rs                |   18 +--
 src/cmd/run_cmd.rs                |   93 +++++++++++----
 src/cmd/select_cmd.rs             |   28 ++---
 src/cmd/stats_cmd.rs              |   32 ++---
 src/cmd/target_cmd.rs             |    2 +-
 src/config.rs                     |    1 +
 src/db/mod.rs                     |   38 +++---
 src/db/ttl.rs                     |    2 +-
 src/engine/ctx.rs                 |   17 ++-
 src/engine/mod.rs                 |   11 +-
 src/ipc/child.rs                  |    1 +
 src/ipc/common.rs                 |    3 +
 src/ipc/parent.rs                 |    9 +-
 src/keyring.rs                    |    4 +-
 src/main.rs                       |   20 +++-
 src/models/account.rs             |    2 +-
 src/models/cryptoaddr.rs          |    2 +-
 src/models/image.rs               |    2 +-
 src/models/port.rs                |    2 +-
 src/models/url.rs                 |    2 +-
 src/notify/mod.rs                 |    9 +-
 src/notify/rules.rs               |    2 +-
 src/registry.rs                   |    6 +-
 src/repl/mod.rs                   |    8 +-
 src/runtime/db.rs                 |    2 +-
 src/runtime/gfx.rs                |   42 +++++++
 src/runtime/logger.rs             |    4 +-
 src/runtime/xml.rs                |   10 +-
 src/shell/complete.rs             |    6 +-
 src/shell/mod.rs                  |   37 +++++-
 src/worker.rs                     |   19 ++-
 src/workspaces.rs                 |    4 +-
 62 files changed, 1056 insertions(+), 919 deletions(-)
 create mode 100644 modules/harness/img-hash.lua
  Installing sn0int v0.23.0 (/usr/share/sn0int)
    Updating crates.io index
error: failed to compile `sn0int v0.23.0 (/usr/share/sn0int)`, intermediate artifacts can be found at `/usr/share/sn0int/target`

Caused by:
  failed to get `atty` as a dependency of package `sn0int v0.23.0 (/usr/share/sn0int)`

Caused by:
  failed to load source for dependency `atty`

Caused by:
  Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  object not found - no match for id (710e01cbc8bf923259f21397df2916b139e031b5); class=Odb (9); code=NotFound (-3)

To Reproduce
Steps to reproduce the behavior:

  1. Run Update from desktop
@Hodgegoblin Hodgegoblin added the bug Something isn't working label Oct 24, 2021
@Hodgegoblin
Copy link
Collaborator Author

Looks like this may be an issue with running cargo as sudo. Would it be possible to build this as the osint user?

This was able to work for me.

sudo chown -R osint:osint /usr/share/sn0int
cd /usr/share/sn0int
cargo build --release

It also looks like there are Kali packages for sn0int. Ref. https://sn0int.readthedocs.io/en/latest/install.html#debian-bullseye-ubuntu-20-04-kali

apt install debian-keyring
gpg -a --export --keyring /usr/share/keyrings/debian-maintainers.gpg [email protected] | apt-key add -
apt-key adv --keyserver keyserver.ubuntu.com --refresh-keys [email protected]
echo deb http://apt.vulns.sexy stable main > /etc/apt/sources.list.d/apt-vulns-sexy.list
apt update
apt install sn0int

@Hodgegoblin
Copy link
Collaborator Author

Was able to make this work with the original process by adding the following to /root/.cargo/config file.

[net]
git-fetch-with-cli = true

This requires git to be install but that requirement is already met. This change allowed the build process to pull down the files required and complete the build process without changing how you had things already setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant