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

Can't access webpanel #336

Closed
PawelGluszek opened this issue Mar 22, 2021 · 28 comments
Closed

Can't access webpanel #336

PawelGluszek opened this issue Mar 22, 2021 · 28 comments

Comments

@PawelGluszek
Copy link

PawelGluszek commented Mar 22, 2021

Hi i followed installation guide. Only thing I didn't change was interface name(After removing symlink i couldn't connect to ssh). I can't access web panel of nzyme. What should I do? Also I have PiHole on this raspberry
Output of sudo systemctl status nzyme

nzyme.service - Nzyme
   Loaded: loaded (/lib/systemd/system/nzyme.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-03-22 14:32:56 CET; 2min 48s ago
     Docs: https://github.com/lennartkoopmann/nzyme
 Main PID: 1184 (nzyme)
    Tasks: 12 (limit: 2062)
   CGroup: /system.slice/nzyme.service
           ├─1184 /bin/sh /usr/share/nzyme/bin/nzyme
           └─1185 /usr/bin/java -jar -Dlog4j.configurationFile=file:///etc/nzyme/log4j2-debian.xml /usr/share/nzyme/nzyme.jar -c /etc/nzyme/nzyme.conf

mar 22 14:32:56 raspberrypi systemd[1]: Started Nzyme.
mar 22 14:33:01 raspberrypi nzyme[1184]: WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.

Here is my config:

  role: LEADER

  # The ID or name of this nzyme instance. Must be unique and contain only alphanumeric characters, underscores and dashes.
  id: nzyme-node-01

  # Admin password SHA256 hash. (64 characters) - generate with, for example, sha256sum on Linux: $ echo -n secretpassword | sha256sum
  # You will use this password to log in to the web interface.
  admin_password_hash: hashofpass
  
  # Path to postgreSQL database. Make suer to change username, password and database name. (This is described in the documentation)
  database_path: "postgresql://localhost:5432/nzyme?user=nzyme&password=mypass"

  # Download current list of manufacturers and enable MAC address to manufacturer lookup?
  fetch_ouis: true

  # Path to directory that the tracker will use to store some temporary information. (must be writable)
  data_directory: /usr/share/nzyme

  # We use Python to inject frames for traps.
  python {
    # Path to python executable. (nzyme supports both Python 3 and 2)
    path: /usr/bin/python3.7

    # Script directory. This must be an existing and writable directory. We'll store some generated Python scripts here.
    script_directory: /tmp

    # Script prefix. A prefix for the generate scripts. There is usually no reason to change this setting.
    script_prefix: nzyme_
  }

  alerting {
    # Notifications and callbacks for triggered alerts.
    callbacks: [
      {
        type: email
        enabled: false

        # One of: SMTP, SMTPS or SMTP_TLS
        transport_strategy: SMTP_TLS

        host: smtp.example.org
        port: 587
        username: "your_username"
        password: "your_password"

        from: "nzyme <nzyme@example.org>"
        subject_prefix: "[NZYME]"

        recipients: [
          "Somebody <somebody@example.org>",
          "Somebody Else <somebody.else@example.org>"
        ]
      }
    ]

    # Length of the training period. Do not change this if you don't know what this means.
    training_period_seconds: 300
  }

  # Regularly check if this version of nzyme is outdated?
  versionchecks: true
}

# Web interface and REST API configuration.
interfaces: {
  # Make sure to set this to an IP address you can reach from your workstation.
  rest_listen_uri: "http://192.168.0.2:22900/"

  # This is usually the same as the `rest_listen_uri`. Take a look at the configuration documentation to learn about
  # other use-cases. It will be interesting if you run behind a load balancer or NAT. (basically, it is the address
  # that your web browser will use to try to connect to nzyme and it has to be reachable for it.)
  http_external_uri: "http://192.168.0.2:22900/"

  # Use TLS? (HTTPS) See https://go.nzyme.org/docs-https
  use_tls: false
}

# List of Graylog GELF TCP inputs. (Optional but strongly recommended to enable analytics, forensics and incident response.)
# See https://go.nzyme.org/docs-wifi-threat-hunting
graylog_uplinks: []

# 802.11/Wifi adapters that are designated to read traffic.
# The more monitors you have listening on different channels, the more traffic will be picked up and the more
# traffic will be available as the basis for alerts and analysis.
# See: https://go.nzyme.org/network-monitoring
802_11_monitors: [
  {
    # The 802.11/WiFi adapter name. (from `ifconfig` or `ip link`)
    device: wlan0

    # WiFi interface and 802.11 channels to use. Nzyme will cycle your network adapters through these channels.
    # Consider local legal requirements and regulations.
    # See also: https://en.wikipedia.org/wiki/List_of_WLAN_channels
    channels: [7]

    # There is no way for nzyme to configure your wifi interface directly. We are using direct operating system commands to
    # configure the adapter. Examples for Linux are in the documentation.
    channel_hop_command: "sudo /sbin/iwconfig {interface} channel {channel}"

    # Channel hop interval in seconds. Leave at default if you don't know what this is.
    channel_hop_interval: 1
  }
]

# A list of all your 802.11/WiFi networks. This will be used for automatic alerting.
# It is recommended to leave this empty or on default at first start of nzyme and
# then build it using the data nzyme shows in the web interface. For example, the
# "security" and "fingerprints" strings can be copied from the web interface.
802_11_networks: [
  {
    ssid: mywifinetwork
    channels: [1,2,3,4,5,6,7,8,9,10,11,12,13]
    security: [WPA2-PSK-CCMP]
    beacon_rate: 40
    bssids: [
      {
        address: "f0:9f:c2:dd:18:f6",
        fingerprints: [ 8ba95bfb6207749c01479235017a76b15ad63c387fd0bcc74593388f81326ca0 ]
      }
    ]
  }
]

# List of enabled 802.11/WiFi alert types. Remove or comment out (#) an alert type to mute it. TODO ADD DOCS LINK
802_11_alerts: [
  unexpected_bssid
  unexpected_ssid
  crypto_change
  unexpected_channel
  unexpected_fingerprint
  beacon_rate_anomaly
  multiple_signal_tracks
  pwnagotchi_advertisement
  bandit_contact
]

# Optional: Traps to set up. See: https://go.nzyme.org/deception-and-traps
802_11_traps: []

# Optional: A device to communicate with nzyme trackers, used to track down physical location of bandits. Please read
# more in the documentation. See: https://go.nzyme.org/bandits-and-trackers
groundstation_device: {}
@agent932
Copy link

Same Issue, on Pi3, everything is running but no joy on the web panel, have tried:

http_external_uri: "http://<PI_IP ADDRESS>:22900/"
http_external_uri: "http://127.0.0.1:22900/"
http_external_uri: "http://0.0.0.0:22900/"

@agent932
Copy link

@ PawelGluszek I have checked in "cat /var/log/nzyme/nzyme.log" and it appears that python 3.8 is not installed (looks to be using 3.7), I am going through the 3.8 install now and will post my results.

@PawelGluszek
Copy link
Author

My web panel started working on new pi install but I have this error

17:22:45.000 [probe-loop-0] ERROR horse.wtf.nzyme.dot11.probes.Dot11Probe - Could not initialize probe [broad-monitor-wlan0]. Retrying soon.
horse.wtf.nzyme.dot11.probes.Dot11ProbeInitializationException: Could not build PCAP handle.
        at horse.wtf.nzyme.dot11.probes.Dot11MonitorProbe.initialize(Dot11MonitorProbe.java:149) ~[nzyme-1.0.0.jar:?]
        at horse.wtf.nzyme.dot11.probes.Dot11MonitorProbe.lambda$loop$0(Dot11MonitorProbe.java:163) ~[nzyme-1.0.0.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.pcap4j.core.PcapNativeException: That device doesn't support monitor mode
        at org.pcap4j.core.PcapHandle.<init>(PcapHandle.java:166) ~[nzyme-1.0.0.jar:?]
        at org.pcap4j.core.PcapHandle.<init>(PcapHandle.java:45) ~[nzyme-1.0.0.jar:?]
        at org.pcap4j.core.PcapHandle$Builder.build(PcapHandle.java:1529) ~[nzyme-1.0.0.jar:?]
        at horse.wtf.nzyme.dot11.probes.Dot11MonitorProbe.initialize(Dot11MonitorProbe.java:143) ~[nzyme-1.0.0.jar:?]
        ... 6 more```

@agent932
Copy link

@agent932
Copy link

and verify your device is capable of monitor mode

@PawelGluszek
Copy link
Author

I have Raspberry 3B+

@agent932
Copy link

do you have an external wifi adapter or are you using the built-in wifi?

@PawelGluszek
Copy link
Author

built-in

@agent932
Copy link

you will need an adapter capable of monitor mode, https://www.nzyme.org/documentation/requirements

@PawelGluszek
Copy link
Author

Can I use TP-LINK TL-WN722N wifi adapter and use this tutorial? Tutorial

@PawelGluszek
Copy link
Author

I followed some tutorial that I found and I have this result

19:10:20.361 [probe-loop-0] INFO  horse.wtf.nzyme.dot11.probes.Dot11Probe - Building PCAP handle on interface [wlxd46e0e18f6a4]
19:10:20.401 [probe-loop-0] ERROR horse.wtf.nzyme.dot11.probes.Dot11Probe - Could not initialize probe [broad-monitor-wlxd46e0e18f6a4]. Retrying soon.
horse.wtf.nzyme.dot11.probes.Dot11ProbeInitializationException: Could not build PCAP handle.
        at horse.wtf.nzyme.dot11.probes.Dot11MonitorProbe.initialize(Dot11MonitorProbe.java:149) ~[nzyme-1.0.0.jar:?]
        at horse.wtf.nzyme.dot11.probes.Dot11MonitorProbe.lambda$loop$0(Dot11MonitorProbe.java:163) ~[nzyme-1.0.0.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: org.pcap4j.core.PcapNativeException: wlxd46e0e18f6a4: SIOCGIWPRIV: Argument list too long
        at org.pcap4j.core.PcapHandle.<init>(PcapHandle.java:166) ~[nzyme-1.0.0.jar:?]
        at org.pcap4j.core.PcapHandle.<init>(PcapHandle.java:45) ~[nzyme-1.0.0.jar:?]
        at org.pcap4j.core.PcapHandle$Builder.build(PcapHandle.java:1529) ~[nzyme-1.0.0.jar:?]
        at horse.wtf.nzyme.dot11.probes.Dot11MonitorProbe.initialize(Dot11MonitorProbe.java:143) ~[nzyme-1.0.0.jar:?]
        ... 6 more```

@agent932
Copy link

I don't think you will get anywhere without an adapter in monitor mode

@PawelGluszek
Copy link
Author

Okay, anyway thanks for help

@PawelGluszek
Copy link
Author

PawelGluszek commented Mar 22, 2021

Ah, I would like to ask another question I found Alfa Network AWUS036NHA adapter. But in requierments page it says that ALFA AWUS036NH this adapter will work. Will adapter that I found work as well? Link to Amazon Also, What I'll have to do in order to put it in monitor mode?

@agent932
Copy link

that's a choose your own adventure kinda think, I am using a Tplink 722n and its not on the list but working great

@PawelGluszek
Copy link
Author

If you mean wn722n I have this adapter but it's now working for me.

@agent932
Copy link

Ya that's the one image

@PawelGluszek
Copy link
Author

Mhh weird i just used this wifi adapter and didn't work. Can if you changed anything in this adapter or it just worked when you plugged it?

@agent932
Copy link

It just worked no changes

@PawelGluszek
Copy link
Author

welp, I have no idea what went wrong with my adapter

@agent932
Copy link

agent932 commented Mar 22, 2021

did you delete the /etc/systemd/network/99-default.link and put your adapter name in the config?

@PawelGluszek
Copy link
Author

Yes i did

@agent932
Copy link

This is my iwconfig while its running

image

@PawelGluszek
Copy link
Author

PawelGluszek commented Mar 22, 2021

Well I'll reinstall raspbian and try again
Here is my iwconfig its bit different don't know why
Screenshot 2021-03-22 223135

@agent932
Copy link

I just used the Raspberry Pi imager here https://www.raspberrypi.org/software/

@PawelGluszek
Copy link
Author

PawelGluszek commented Mar 22, 2021

Yeah i used to flash it that way but today I flashed my other pi with this imager and it created boot 512MB and 1.5 GB of ext4/rootfs and left 28 GB unallocated

@lennartkoopmann
Copy link
Member

Hi! I'm closing this issue because it is no longer on-topic. Please move it to the Discussion Forums instead. Thank you!

@PawelGluszek
Copy link
Author

Hmm, my iwconfig says that my adapter runs in auto mode but yours in monitor

@nzymedefense nzymedefense locked as off-topic and limited conversation to collaborators Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants