evilsocket / pwnagotchi

(⌐■_■) - Deep Reinforcement Learning instrumenting bettercap for WiFi pwning.
https://pwnagotchi.ai/
Other
7.75k stars 1.15k forks source link

Config.toml #954

Open Busdesto opened 3 years ago

Busdesto commented 3 years ago

Hi my pwnagotchi works perfectly fine with the waveshare 2 black and white display (the one with the red tab on it) when using defaults.toml however no matter how I decide to input my config.toml (either through dropping the file in windows or ssh in Linux and changing the directory) the waveshare screen does not work with the config.toml and I think the entire pwnagotchi is not working with the config.toml as well. I have checked to see if the formatting of the config.toml is wrong but it isn't and wont work with it. It would be nice to have my home networks whitelisted so I don't keep pwning them everytime I leave my pwnagotchi on. Any help would be greatly appreciated thanks!

thecoder-001 commented 3 years ago

Hello! Can you share your config? I would verify it as soon as I get some time. I guess something is wrong there, stopping the pwnagotchi from starting. Cheers

Busdesto commented 3 years ago

WARNING WARNING WARNING WARNING

#

This file is recreated with default settings on every pwnagotchi restart,

use /etc/pwnagotchi/config.yml to configure this unit.

# #

main algorithm configuration

main:

currently implemented: en (default), de, el, fr, it, mk, nl, ru, se, pt-BR, es, pt

lang: en
# custom plugins path, if null only default plugins with be loaded
custom_plugins:
# which plugins to load and enable
plugins:
    grid:
        enabled: true
        report: false # don't report pwned networks by default!
        exclude: # do not report the following networks (accepts both ESSIDs and BSSIDs)
            - 'CawdonHouse'
            - 'CawdonHouseGuest'
            - 'NETGEAR72'
            - 'NEATGEAR72-5G'
    auto-update:
        enabled: false
        interval: 12 # every 12 hours
        install: true # if false, it will only warn that updates are available, if true it will install them
    auto-backup:
        enabled: false
        interval: 1 # every day
        files:
            - /root/brain.nn
            - /root/brain.json
            - /root/.api-report.json
            - /root/handshakes/
            - /etc/pwnagotchi/
            - /var/log/pwnagotchi.log
        commands:
            - 'tar czf /root/pwnagotchi-backup.tar.gz {files}'
    net-pos:
        enabled: false
        api_key: 'test'
    gps:
        enabled: false
        speed: 19200
        device: /dev/ttyUSB0
    twitter:
        enabled: false
        consumer_key: aaa
        consumer_secret: aaa
        access_token_key: aaa
        access_token_secret: aaa
    onlinehashcrack:
        enabled: false
        email: ~
    wpa-sec:
        enabled: false
        api_key: ~
        api_url: "https://wpa-sec.stanev.org"
    wigle:
        enabled: false
        api_key: ~
    screen_refresh:
        enabled: false
        refresh_interval: 50
    quickdic:
        enabled: false
        wordlist_folder: /opt/wordlists/
    AircrackOnly:
        enabled: false
    bt-tether:
        enabled: false # if you want to use this, set ui.display.video.address to 0.0.0.0
        mac: ~ # mac of your bluetooth device
        ip: '192.168.44.44' # ip from which your pwnagotchi should be reachable
        netmask: 24
        interval: 1 # check every x minutes for device
        share_internet: false
    memtemp: # Display memory usage, cpu load and cpu temperature on screen
        enabled: false
        orientation: horizontal # horizontal/vertical
# monitor interface to use
iface: mon0
# command to run to bring the mon interface up in case it's not up already
mon_start_cmd: /usr/bin/monstart
mon_stop_cmd: /usr/bin/monstop
mon_max_blind_epochs: 50
# log file
log: /var/log/pwnagotchi.log
# if true, will not restart the wifi module
no_restart: false
# access points to ignore
whitelist:
    - 'CawdonHouse'
    - 'CawdonHouseGuest'
    - 'NETGEAR72'
    - 'NEATGEAR72-5G'
# if not null, filter access points by this regular expression
filter: null

ai:

if false, only the default 'personality' will be used

enabled: true
path: /root/brain.nn
# 1.0 - laziness = probability of start training
laziness: 0.1
# how many epochs to train on
epochs_per_episode: 50
params:
    # discount factor
    gamma: 0.99
    # the number of steps to run for each environment per update
    n_steps: 1
    # value function coefficient for the loss calculation
    vf_coef: 0.25
    # entropy coefficient for the loss calculation
    ent_coef: 0.01
    # maximum value for the gradient clipping
    max_grad_norm: 0.5
    # the learning rate
    learning_rate: 0.0010
    # rmsprop decay parameter
    alpha: 0.99
    # rmsprop epsilon
    epsilon: 0.00001
    # the verbosity level: 0 none, 1 training information, 2 tensorflow debug
    verbose: 1
    # type of scheduler for the learning rate update ('linear', 'constant', 'double_linear_con', 'middle_drop' or 'double_middle_drop')
    lr_schedule: 'constant'
    # the log location for tensorboard (if None, no logging)
    tensorboard_log: null

personality:

advertise our presence

advertise: true
# perform a deauthentication attack to client stations in order to get full or half handshakes
deauth: true
# send association frames to APs in order to get the PMKID
associate: true
# list of channels to recon on, or empty for all channels
channels: []
# minimum WiFi signal strength in dBm
min_rssi: -200
# number of seconds for wifi.ap.ttl
ap_ttl: 120
# number of seconds for wifi.sta.ttl
sta_ttl: 300
# time in seconds to wait during channel recon
recon_time: 30
# number of inactive epochs after which recon_time gets multiplied by recon_inactive_multiplier
max_inactive_scale: 2
# if more than max_inactive_scale epochs are inactive, recon_time *= recon_inactive_multiplier
recon_inactive_multiplier: 2
# time in seconds to wait during channel hopping if activity has been performed
hop_recon_time: 10
# time in seconds to wait during channel hopping if no activity has been performed
min_recon_time: 5
# maximum amount of deauths/associations per BSSID per session
max_interactions: 3
# maximum amount of misses before considering the data stale and triggering a new recon
max_misses_for_recon: 5
# number of active epochs that triggers the excited state
excited_num_epochs: 10
# number of inactive epochs that triggers the bored state
bored_num_epochs: 15
# number of inactive epochs that triggers the sad state
sad_num_epochs: 25

ui configuration

ui:

here you can customize the faces

faces:
    look_r: '( ⚆_⚆)'
    look_l: '(☉_☉ )'
    sleep: '(⇀‿‿↼)'
    sleep2: '(≖‿‿≖)'
    awake: '(◕‿‿◕)'
    bored: '(-__-)'
    intense: '(°▃▃°)'
    cool: '(⌐■_■)'
    happy: '(•‿‿•)'
    excited: '(ᵔ◡◡ᵔ)'
    motivated: '(☼‿‿☼)'
    demotivated: '(≖__≖)'
    smart: '(✜‿‿✜)'
    lonely: '(ب__ب)'
    sad: '(╥☁╥ )'
    friend: '(♥‿‿♥)'
    broken: '(☓‿‿☓)'
    debug: '(#__#)'
# ePaper display can update every 3 secs anyway, set to 0 to only refresh for major data changes
# IMPORTANT: The lifespan of an eINK display depends on the cumulative amount of refreshes. If you want to
# preserve your display over time, you should set this value to 0.0 so that the display will be refreshed only
# if any of the important data fields changed (the uptime and blinking cursor won't trigger a refresh).
fps: 0.0
display:
    enabled: true
    rotation: 180
    # Possible options inkyphat/inky, papirus/papi, waveshare_1/ws_1 or waveshare_2/ws_2, oledhat, waveshare27inch
    type: 'waveshare_2'
    # Possible options red/yellow/black (black used for monocromatic displays)
    color: 'black'
    video:
        enabled: true
        address: '0.0.0.0'
        origin: '*'
        port: 8080
        # command to be executed when a new png frame is available
        # for instance, to use with framebuffer based displays:
        # on_frame: 'fbi -a -d /dev/fb1 -T 1 /root/pwnagotchi.png'
        on_frame: ''

bettercap rest api configuration

bettercap:

api scheme://hostname:port username and password

scheme: http
hostname: localhost
port: 8081
username: pwnagotchi
password: pwnagotchi
# folder where bettercap stores the WPA handshakes, given that
# wifi.handshakes.aggregate will be set to false and individual
# pcap files will be created in order to minimize the chances
# of a single pcap file to get corrupted
handshakes: /handshakes
# events to mute in bettercap's events stream
silence:
    - ble.device.new
    - ble.device.lost
    - ble.device.disconnected
    - ble.device.connected
    - ble.device.service.discovered
    - ble.device.characteristic.discovered
    - wifi.client.new
    - wifi.client.lost
    - wifi.client.probe
    - wifi.ap.new
    - wifi.ap.lost
    - mod.started
thecoder-001 commented 3 years ago

hmm, you seem to be using the old yml format in your config file instead of toml. Here's the corrected config. Also from next time, please try to use code blocks.

main.name = "Pwnagotchi"
main.lang = "en"
main.confd = "/etc/pwnagotchi/conf.d/"
main.custom_plugins = ""
main.custom_plugin_repos = [
  "https://github.com/evilsocket/pwnagotchi-plugins-contrib/archive/master.zip"
]
main.iface = "mon0"
main.mon_start_cmd = "/usr/bin/monstart"
main.mon_stop_cmd = "/usr/bin/monstop"
main.mon_max_blind_epochs = 50
main.no_restart = false
main.whitelist = [
  "CawdonHouse",
  "CawdonHouseGuest",
  "NETGEAR72",
  "NEATGEAR72-5G"
]
main.filter = ""

main.plugins.grid.enabled = true
main.plugins.grid.report = false
main.plugins.grid.exclude = [
  "CawdonHouse",
  "CawdonHouseGuest",
  "NETGEAR72",
  "NEATGEAR72-5G"
]

main.plugins.auto-update.enabled = false
main.plugins.auto-update.install = true
main.plugins.auto-update.interval = 1

main.plugins.net-pos.enabled = false
main.plugins.net-pos.api_key = "test"

main.plugins.gps.enabled = false
main.plugins.gps.speed = 19200
main.plugins.gps.device = "/dev/ttyUSB0"

main.plugins.webgpsmap.enabled = false

main.plugins.onlinehashcrack.enabled = false
main.plugins.onlinehashcrack.email = ""
main.plugins.onlinehashcrack.dashboard = ""
main.plugins.onlinehashcrack.single_files = false
main.plugins.onlinehashcrack.whitelist = []

main.plugins.wpa-sec.enabled = false
main.plugins.wpa-sec.api_key = ""
main.plugins.wpa-sec.api_url = "https://wpa-sec.stanev.org"
main.plugins.wpa-sec.download_results = false
main.plugins.wpa-sec.whitelist = []

main.plugins.wigle.enabled = false
main.plugins.wigle.api_key = ""
main.plugins.wigle.whitelist = []

main.plugins.bt-tether.enabled = false

main.plugins.bt-tether.devices.android-phone.enabled = false
main.plugins.bt-tether.devices.android-phone.search_order = 1
main.plugins.bt-tether.devices.android-phone.mac = ""
main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44"
main.plugins.bt-tether.devices.android-phone.netmask = 24
main.plugins.bt-tether.devices.android-phone.interval = 1
main.plugins.bt-tether.devices.android-phone.scantime = 10
main.plugins.bt-tether.devices.android-phone.max_tries = 10
main.plugins.bt-tether.devices.android-phone.share_internet = false
main.plugins.bt-tether.devices.android-phone.priority = 1

main.plugins.bt-tether.devices.ios-phone.enabled = false
main.plugins.bt-tether.devices.ios-phone.search_order = 2
main.plugins.bt-tether.devices.ios-phone.mac = ""
main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6"
main.plugins.bt-tether.devices.ios-phone.netmask = 24
main.plugins.bt-tether.devices.ios-phone.interval = 5
main.plugins.bt-tether.devices.ios-phone.scantime = 20
main.plugins.bt-tether.devices.ios-phone.max_tries = 0
main.plugins.bt-tether.devices.ios-phone.share_internet = false
main.plugins.bt-tether.devices.ios-phone.priority = 999

main.plugins.memtemp.enabled = false
main.plugins.memtemp.scale = "celsius"
main.plugins.memtemp.orientation = "horizontal"

main.plugins.paw-gps.enabled = false
main.plugins.paw-gps.ip = ""

main.plugins.gpio_buttons.enabled = false

main.plugins.led.enabled = true
main.plugins.led.led = 0
main.plugins.led.delay = 200
main.plugins.led.patterns.loaded = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.updating = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.unread_inbox = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ready = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ai_ready = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ai_training_start = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ai_best_reward = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.ai_worst_reward = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.bored = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.sad = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.excited = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.lonely = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.rebooting = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.wait = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.sleep = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.wifi_update = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.association = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.deauthentication = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.handshake = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.epoch = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.peer_detected = "oo  oo  oo oo  oo  oo  oo"
main.plugins.led.patterns.peer_lost = "oo  oo  oo oo  oo  oo  oo"

main.plugins.logtail.enabled = false
main.plugins.logtail.max-lines = 10000

main.plugins.session-stats.enabled = true
main.plugins.session-stats.save_directory = "/var/tmp/pwnagotchi/sessions/"

main.log.path = "/var/log/pwnagotchi.log"
main.log.rotation.enabled = true
main.log.rotation.size = "10M"

ai.enabled = true
ai.path = "/root/brain.nn"
ai.laziness = 0.1
ai.epochs_per_episode = 50

ai.params.gamma = 0.99
ai.params.n_steps = 1
ai.params.vf_coef = 0.25
ai.params.ent_coef = 0.01
ai.params.max_grad_norm = 0.5
ai.params.learning_rate = 0.001
ai.params.alpha = 0.99
ai.params.epsilon = 0.00001
ai.params.verbose = 1
ai.params.lr_schedule = "constant"

personality.advertise = true
personality.deauth = true
personality.associate = true
personality.channels = []
personality.min_rssi = -200
personality.ap_ttl = 120
personality.sta_ttl = 300
personality.recon_time = 30
personality.max_inactive_scale = 2
personality.recon_inactive_multiplier = 2
personality.hop_recon_time = 10
personality.min_recon_time = 5
personality.max_interactions = 3
personality.max_misses_for_recon = 5
personality.excited_num_epochs = 10
personality.bored_num_epochs = 15
personality.sad_num_epochs = 25
personality.bond_encounters_factor = 20000

ui.fps = 0.0
ui.font.name = "DejaVuSansMono" # for japanese: fonts-japanese-gothic
ui.font.size_offset = 0 # will be added to the font size

ui.faces.look_r = "( ⚆_⚆)"
ui.faces.look_l = "(☉_☉ )"
ui.faces.look_r_happy = "( ◕‿◕)"
ui.faces.look_l_happy = "(◕‿◕ )"
ui.faces.sleep = "(⇀‿‿↼)"
ui.faces.sleep2 = "(≖‿‿≖)"
ui.faces.awake = "(◕‿‿◕)"
ui.faces.bored = "(-__-)"
ui.faces.intense = "(°▃▃°)"
ui.faces.cool = "(⌐■_■)"
ui.faces.happy = "(•‿‿•)"
ui.faces.excited = "(ᵔ◡◡ᵔ)"
ui.faces.grateful = "(^‿‿^)"
ui.faces.motivated = "(☼‿‿☼)"
ui.faces.demotivated = "(≖__≖)"
ui.faces.smart = "(✜‿‿✜)"
ui.faces.lonely = "(ب__ب)"
ui.faces.sad = "(╥☁╥ )"
ui.faces.angry = "(-_-')"
ui.faces.friend = "(♥‿‿♥)"
ui.faces.broken = "(☓‿‿☓)"
ui.faces.debug = "(#__#)"

ui.web.enabled = true
ui.web.address = "0.0.0.0"
ui.web.username = "changeme"
ui.web.password = "changeme"
ui.web.origin = ""
ui.web.port = 8080
ui.web.on_frame = ""

ui.display.enabled = true
ui.display.rotation = 180
ui.display.type = "waveshare_2"
ui.display.color = "black"

bettercap.scheme = "http"
bettercap.hostname = "localhost"
bettercap.port = 8081
bettercap.username = "pwnagotchi"
bettercap.password = "pwnagotchi"
bettercap.handshakes = "/root/handshakes"
bettercap.silence = [
  "ble.device.new",
  "ble.device.lost",
  "ble.device.disconnected",
  "ble.device.connected",
  "ble.device.service.discovered",
  "ble.device.characteristic.discovered",
  "wifi.client.new",
  "wifi.client.lost",
  "wifi.client.probe",
  "wifi.ap.new",
  "wifi.ap.lost",
  "mod.started"
]

fs.memory.enabled = false
fs.memory.mounts.log.enabled = false
fs.memory.mounts.log.mount = "/var/log"
fs.memory.mounts.log.size = "50M"
fs.memory.mounts.log.sync = 60
fs.memory.mounts.log.zram = true
fs.memory.mounts.log.rsync = true

fs.memory.mounts.data.enabled = false
fs.memory.mounts.data.mount = "/var/tmp/pwnagotchi"
fs.memory.mounts.data.size = "10M"
fs.memory.mounts.data.sync = 3600
fs.memory.mounts.data.zram = false
fs.memory.mounts.data.rsync = true

Attaching a compressed version, just in case. config.toml.zip Try this one and report back. Cheers

Busdesto commented 3 years ago

Thanks very much everything seems to be working as expected