Skip to content

Commit 0c87113

Browse files
authored
Update README.md
1 parent 2515002 commit 0c87113

File tree

1 file changed

+19
-66
lines changed

1 file changed

+19
-66
lines changed

README.md

Lines changed: 19 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
## DShield Raspberry Pi Sensor
44

5-
This is a set of scripts to setup a Raspberry Pi as a DShield Sensor.
5+
This is a set of scripts to set up a Raspberry Pi as a DShield Sensor.
66

77
Current design goals and prerequisites for using the automated installation procedure:
88
- use of a __dedicated__ device (Raspberry Pi 3 or later, n100 mini PC or a virtual machine work fine)
99
- minimum of 1GB of RAM and 16GB of Disk (SD Card for Raspberry Pis). 4GB of RAM works better. Larger SD Cards (e.g. 64 GB) are recommended for longevity and to prevent logs from filling up the disk.
1010
- current Raspberry Pi OS ("Lite" version will suffice) or current version of Ubuntu Linux
11-
- easy installation / configuration (and therefore not that much configurable)
12-
- disposable (when something breaks (e.g. during upgrade): re-install from scratch)
13-
- minimize complexity and overhead (e.g. no virtualization like docker)
11+
- easy installation/configuration (and therefore not that configurable)
12+
- disposable (when something breaks (e.g., during upgrade): re-install from scratch)
13+
- minimize complexity and overhead (e.g., no virtualization like Docker)
1414
- support for IPv4 only (for the internal net)
15-
- one interface only (e.g. eth0)
15+
- one interface only (e.g,. eth0)
1616

1717
The current version is only tested on Raspberry Pi OS and Ubuntu 22.04 LTS Server, not on other distros, sorry.
18-
If there is the need for other distros, "someone" has to check and maintain the installation script.
18+
If there is a need for other distros, "someone" has to check and maintain the installation script.
1919

2020
## Installation
2121

@@ -29,17 +29,18 @@ Reference the following files for OS-specific installation instructions:
2929

3030
This script will:
3131

32-
- disable IPv6 on the Pi
33-
- enable firewall logging and submitting of logs to DShield
34-
- change your ssh server to listen on port 12222
35-
- install the ssh honeypot cowrie (for ssh)
36-
- install needed environment (e.g. MySQL server, Python packages, ...)
32+
- Disable IPv6 on the Pi
33+
- enable firewall logging and submission of logs to DShield
34+
- Change your SSH server to listen on port 12222
35+
- install the SSH honeypot Cowrie (for SSH)
36+
- install the HTTP honeypot ("isc_agent")
37+
- install needed environment (Python packages, stunnel for https, ...)
3738

3839
## Troubleshooting
3940

40-
- logs are sent twice an hour to the [dshield portal](https://www.dshield.org) by the cron job `/etc/cron.d/dshield`, this can be verified by ['My Account' -> 'My Reports'](https://www.dshield.org/myreports.html)
41-
- have a look at the output from the status script: `/home/pi/install/dshield/bin/status.sh`
42-
- if you get strange python / pip errors during installation / updates you may try the following commands as root:
41+
- Logs are sent twice an hour to the [dshield portal](https://www.dshield.org) by the cron job `/etc/cron.d/dshield`, this can be verified by ['My Account' -> 'My Reports'](https://www.dshield.org/myreports.html)
42+
- Have a look at the output from the status script: `/srv/dshield/status.sh`
43+
- If you get strange Python or pip-related errors during installation or during updates, try the following commands as root:
4344
`pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U`
4445

4546
- Check our [Trouble Shooting Guide](https://github.com/DShield-ISC/dshield/blob/main/docs/general-guides/Troubleshooting.md) for help identifying issues.
@@ -60,56 +61,8 @@ Configuration parameters like your API Key will be retained. To edit the configu
6061

6162
A new feature has been introduced, especially for automatic updates. At the end of the installation the install.sh script will search for the file /root/bin/postinstall.sh and execute its content, if it exists. If you need some extra changes in the newly installed files, this is the location to put them. This file NEEDS execute rights.
6263

63-
Please make sure to keep special port and network configuration up to date (e.g. manually configure recently added telnet / web ports in firewall config), e.g. no-log config, no-honey config, ... unfortunately this can't be done automagically as of now. If unsure delete respective lines in `/etc/dshield.ini` and re-run the installation script.
64+
Please make sure to keep special port and network configuration up to date (e.g., manually configure recently added telnet / web ports in firewall config), e.g., no-log config, no-honey config, ... unfortunately, this can't be done automagically as of now. If unsure, delete respective lines in `/etc/dshield.ini` and re-run the installation script.
6465

65-
Testing of update procedure is normally done (between two releases) as follows:
66-
- update on Pi 3 from the last version to current
67-
- install on a current clean image of raspbian lite on a Pi 3
68-
69-
### Special Update Note: Versions < 0.4 to >= 0.4
70-
71-
The handling of Python packages had to be changed from distro package manager to pip. This means the update is pain. Sorry for that.
72-
73-
You have three alternatives:
74-
75-
#### Easy
76-
77-
The easiest, preferred and warmly recommended way: backup old installation (if you can't stand a complete loss), reinstall from scratch using current Raspbian image.
78-
79-
#### Manual
80-
81-
The manual procedure: uninstall all below mentioned packages and then autoremove and cross fingers:
82-
```
83-
sudo su -
84-
/etc/init.d/cowrie stop
85-
dpkg --remove python-crypto
86-
dpkg --remove python-gmpy
87-
dpkg --remove python-gmpy2
88-
dpkg --remove python-mysqldb
89-
dpkg --remove python-pip
90-
dpkg --remove python-pyasn1
91-
dpkg --remove python-twisted
92-
dpkg --remove python-virtualenv
93-
dpkg --remove python-zope.interface
94-
apt-get autoremove
95-
apt-get update
96-
apt-get dist-upgrade
97-
```
98-
99-
#### Automatic
100-
101-
The "automatic" **brutal** procedure (chances to break your system are **VERY** high, but hey, it's a disposable honeypot anyway ...): backup (if needed), uninstall all Python distro packages (and hope that's it):
102-
```
103-
sudo su -
104-
/etc/init.d/cowrie stop
105-
for PKG in `dpkg --list | grep python- | cut -d " " -f 3 | grep "^python"` ; do echo "uninstalling ${PKG}"; dpkg --force-depends --purge ${PKG}; done
106-
apt-get update
107-
apt-get -f install
108-
apt-get dist-upgrade
109-
apt-get autoremove
110-
apt-get update
111-
apt-get dist-upgrade
112-
```
11366

11467
## Hints
11568

@@ -133,14 +86,14 @@ To test your set up you may use a public port scanner and point it to the router
13386
- ESC: exit the form (Cancel)
13487
- cursor up / down: navigate through form / between input fields
13588
- cursor left / right: navigate within an input field
136-
- TAB: switch between input field and "buttons"
89+
- TAB: switch between the input fields and "buttons"
13790
- don't use Pos 1 / End
13891

139-
## Todos
92+
## TODOs
14093

14194
- see comments in `install.sh`
14295
- provide a script to update all Python packages to most recent version using pip
143-
- configure a default web server and submit logs to DShield
96+
- Configure a default web server and submit logs to DShield
14497
- enable other honeypot ports than ssh
14598
- do all the user input stuff at the beginning of the script so it will run the long lasting stuff afterwards
14699
- create update script

0 commit comments

Comments
 (0)