pgsqlpot 2.0.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. core/__init__.py +0 -0
  2. core/config.py +50 -0
  3. core/logfile.py +74 -0
  4. core/output.py +39 -0
  5. core/paths.py +53 -0
  6. core/protocol.py +161 -0
  7. core/tools.py +170 -0
  8. output_plugins/__init__.py +0 -0
  9. output_plugins/couch.py +68 -0
  10. output_plugins/datadog.py +74 -0
  11. output_plugins/discord.py +133 -0
  12. output_plugins/elastic.py +137 -0
  13. output_plugins/hpfeed.py +43 -0
  14. output_plugins/influx2.py +66 -0
  15. output_plugins/jsonlog.py +36 -0
  16. output_plugins/kafka.py +57 -0
  17. output_plugins/localsyslog.py +66 -0
  18. output_plugins/mongodb.py +83 -0
  19. output_plugins/mysql.py +210 -0
  20. output_plugins/nlcvapi.py +119 -0
  21. output_plugins/postgres.py +154 -0
  22. output_plugins/redisdb.py +47 -0
  23. output_plugins/rethinkdblog.py +46 -0
  24. output_plugins/slack.py +94 -0
  25. output_plugins/socketlog.py +40 -0
  26. output_plugins/sqlite.py +141 -0
  27. output_plugins/telegram.py +141 -0
  28. output_plugins/textlog.py +46 -0
  29. output_plugins/xmpp.py +193 -0
  30. pgsqlpot/__init__.py +25 -0
  31. pgsqlpot/cli.py +512 -0
  32. pgsqlpot/data/Dockerfile +56 -0
  33. pgsqlpot/data/docs/INSTALL.md +400 -0
  34. pgsqlpot/data/docs/INSTALLWIN.md +411 -0
  35. pgsqlpot/data/docs/PLUGINS.md +21 -0
  36. pgsqlpot/data/docs/TODO.md +8 -0
  37. pgsqlpot/data/docs/datadog/README.md +32 -0
  38. pgsqlpot/data/docs/discord/README.md +58 -0
  39. pgsqlpot/data/docs/geoipupdtask.ps1 +270 -0
  40. pgsqlpot/data/docs/mysql/README.md +176 -0
  41. pgsqlpot/data/docs/mysql/READMEWIN.md +157 -0
  42. pgsqlpot/data/docs/mysql/mysql.sql +85 -0
  43. pgsqlpot/data/docs/postgres/README.md +184 -0
  44. pgsqlpot/data/docs/postgres/READMEWIN.md +196 -0
  45. pgsqlpot/data/docs/postgres/postgres.sql +73 -0
  46. pgsqlpot/data/docs/slack/README.md +68 -0
  47. pgsqlpot/data/docs/sqlite3/README.md +131 -0
  48. pgsqlpot/data/docs/sqlite3/READMEWIN.md +123 -0
  49. pgsqlpot/data/docs/sqlite3/sqlite3.sql +69 -0
  50. pgsqlpot/data/docs/telegram/README.md +103 -0
  51. pgsqlpot/data/etc/honeypot.cfg +415 -0
  52. pgsqlpot/data/etc/honeypot.cfg.base +418 -0
  53. pgsqlpot/data/test/.gitignore +3 -0
  54. pgsqlpot/data/test/test.py +51 -0
  55. pgsqlpot/honeypot.py +117 -0
  56. pgsqlpot-2.0.0.dist-info/METADATA +152 -0
  57. pgsqlpot-2.0.0.dist-info/RECORD +61 -0
  58. pgsqlpot-2.0.0.dist-info/WHEEL +6 -0
  59. pgsqlpot-2.0.0.dist-info/entry_points.txt +2 -0
  60. pgsqlpot-2.0.0.dist-info/licenses/LICENSE +674 -0
  61. pgsqlpot-2.0.0.dist-info/top_level.txt +3 -0
@@ -0,0 +1,123 @@
1
+ # Sending the Output of the Honeypot to an SQLite3 Database
2
+
3
+ - [Sending the Output of the Honeypot to an SQLite3 Database](#sending-the-output-of-the-honeypot-to-an-sqlite3-database)
4
+ - [Prerequisites](#prerequisites)
5
+ - [Installation](#installation)
6
+ - [SQLite3 Database Creation](#sqlite3-database-creation)
7
+ - [Honeypot Configuration](#honeypot-configuration)
8
+ - [Restart the honeypot](#restart-the-honeypot)
9
+
10
+ ## Prerequisites
11
+
12
+ - Working honeypot installation
13
+ - SQLite3 (Can be downloaded from the [official site](https://sqlite.org/download.html))
14
+
15
+ ## Installation
16
+
17
+ When writing to an SQLite3 database, the honeypot uses the free databases
18
+ provided by MaxMind for the purposes of geoloacting the IP addresses. Start by
19
+ downloading the database update program for your particular kind of Windows
20
+ from [GitHub](https://github.com/maxmind/geoipupdate/releases) and put it in a
21
+ directory listed in the `PATH` variable of the environment.
22
+
23
+ Create an account at the [MaxMind web
24
+ site](https://support.maxmind.com/knowledge-base/articles/create-a-maxmind-account),
25
+ log in, go to "My Account" and then to "Manage license keys". Write down the
26
+ account ID, generate a license key, and copy it.
27
+
28
+ Go to the directory `data`, where the gelolocation databases will reside:
29
+
30
+ ```powershell
31
+ PS C:\> cd \pgsqlpot-workdir\data
32
+ ```
33
+
34
+ Create in this directory a file named `geoip.cfg` with the following contents:
35
+
36
+ ```geoip.cfg
37
+ AccountID <ACCOUNT>
38
+ LicenseKey <KEY>
39
+ EditionIDs GeoLite2-City GeoLite2-ASN
40
+ DatabaseDirectory C:\pgsqlpot-workdir\data
41
+ LockFile C:\pgsqlpot-workdir\data\.geoipupdate.lock
42
+ ```
43
+
44
+ Change the paths in the options `DatabaseDirectory` and `LockFile` if you
45
+ have opted to use paths different from the ones suggested by the
46
+ honeypot installation documentation. Make sure you replace `<ACCOUNT>`
47
+ and `<KEY>` with the account and license key obtained from MaxMind.
48
+
49
+ Download the latest version of the Maxmind geolocation databases:
50
+
51
+ ```powershell
52
+ PS C:\pgsqlpot-workdir\data> geoipupdate -f geoip.cfg
53
+ ```
54
+
55
+ To have the database updated automatically (it is updated on MaxMind's site
56
+ every second Tuesday of each month, so download it every second Wednesday),
57
+ run the script `geoipupdtask.ps1` in the working directory:
58
+
59
+ ```powershell
60
+ PS C:\pgsqlpot\data> ..\geoipupdtask.ps1
61
+ ```
62
+
63
+ It expects that the program `geoipupdate.exe` resides in one of the directories
64
+ listed in the `PATH` variable of the environment, that the configuration file
65
+ for it is named `geoip.cfg` and resides in the current directory, and that the
66
+ updating task is to be run at 00:00. Also, it creates an updating task named
67
+ `GeoIPUpdate`, which resides in the task folder `\` and has the description
68
+ `GeoIP database updater`. You can change any of these parameters via
69
+ command-line options to the script:
70
+
71
+ ```powershell
72
+ PS C:\pgsqlpot\data> ..\geoipupdtask.ps1 -TaskName "My GeoIP Database Updater" -TaskPath "\MyTasks" -TaskDescription "Updates the GeoIP database" -RunTime "03:00:00" -geoipupdate "C:\Program File\geoipupdate\geoipupdate.exe" -geoipconfig "C:\pgsqlpot-workdir\data\geoip.cfg"
73
+ ```
74
+
75
+ If you already have the MaxMind geolocation databases installed and updated on
76
+ your machine in some other place, use their respective paths in the
77
+ `[output_sqlite]` section of the file `honeypot.cfg`, as mentioned below.
78
+
79
+ Finally, return to the working directory:
80
+
81
+ ```powershell
82
+ PS C:\pgsqlpot-workdir\data> cd ..
83
+ ```
84
+
85
+ ## SQLite3 Database Creation
86
+
87
+ First, create a database named `pgsqlpot.db`, residing in the `data` directory
88
+ and based on the schema `C:\pgsqlpot-workdir\docs\sqlite3\sqlite3.sql`:
89
+
90
+ ```powershell
91
+ PS C:\pgsqlpot-workdir> sqlite3 C:\pgsqlpot-workdir\data\pgsqlpot.db < C:\pgsqlpot-workdir\docs\sqlite3\sqlite3.sql
92
+ ```
93
+
94
+ If you have opted on keeping the database elsewhere, use its proper path
95
+ instead of `C:\pgsqlpot-workdir\data\pgsqlpot.db`.
96
+
97
+ ## Honeypot Configuration
98
+
99
+ Add the following entries to the file `C:\pgsqlpot-workdir\etc\honeypot.cfg`
100
+
101
+ ```honeypot.cfg
102
+ [output_sqlite]
103
+ enabled = true
104
+ debug = false
105
+ db_file = data/pgsqlpot.db
106
+ # Whether to store geolocation data in the database
107
+ geoip = true
108
+ # Location of the databases used for geolocation
109
+ geoip_citydb = data/GeoLite2-City.mmdb
110
+ geoip_asndb = data/GeoLite2-ASN.mmdb
111
+ ```
112
+
113
+ Make sure the options `geoip_citydb` and `geoip_asndb` point to the correct
114
+ paths of the two MaxMind geolocation databases. Also, if you prefer to keep
115
+ the SQLite3 database elsewhere, make sure that you specify its correct path
116
+ with the `db_file` option.
117
+
118
+ ## Restart the honeypot
119
+
120
+ ```powershell
121
+ PS C:\pgsqlpot-workdir> C:\pgsqlpot-env\scripts\activate.ps1
122
+ (pgsqlpot-env) PS C:\pgsqlpot-workdir> pgsqlpot restart
123
+ ```
@@ -0,0 +1,69 @@
1
+ CREATE TABLE IF NOT EXISTS `connections` (
2
+ `id` INTEGER PRIMARY KEY,
3
+ `session` VARCHAR(32) NOT NULL,
4
+ `timestamp` DATETIME DEFAULT NULL,
5
+ `ip` VARCHAR(15) DEFAULT NULL,
6
+ `remote_port` INT(11) DEFAULT NULL,
7
+ `operation` INT(4) DEFAULT NULL,
8
+ `local_host` VARCHAR(15) DEFAULT NULL,
9
+ `local_port` INT(11) DEFAULT NULL,
10
+ `sensor` INT(4) DEFAULT NULL
11
+ );
12
+
13
+ CREATE INDEX IF NOT EXISTS `time_idx` ON `connections` (`timestamp`);
14
+ CREATE INDEX IF NOT EXISTS `ip_idx` ON `connections` (`ip`);
15
+ CREATE INDEX IF NOT EXISTS `ip2_idx` ON `connections` (`timestamp`, `ip`);
16
+
17
+ CREATE TABLE IF NOT EXISTS `operations` (
18
+ `id` INTEGER PRIMARY KEY,
19
+ `op_name` VARCHAR(20) NOT NULL UNIQUE
20
+ );
21
+
22
+ CREATE TABLE IF NOT EXISTS `credentials` (
23
+ `id` INTEGER PRIMARY KEY,
24
+ `session` VARCHAR(32) NOT NULL,
25
+ `username` INT(4) DEFAULT NULL,
26
+ `password` INT(4) DEFAULT NULL
27
+ );
28
+
29
+ CREATE TABLE IF NOT EXISTS `usernames` (
30
+ `id` INTEGER PRIMARY KEY,
31
+ `username` VARCHAR(255) DEFAULT NULL UNIQUE
32
+ );
33
+
34
+ CREATE TABLE IF NOT EXISTS `passwords` (
35
+ `id` INTEGER PRIMARY KEY,
36
+ `password` VARCHAR(255) DEFAULT NULL UNIQUE
37
+ );
38
+
39
+ CREATE TABLE IF NOT EXISTS `variables` (
40
+ `id` INTEGER PRIMARY KEY,
41
+ `session` VARCHAR(32) NOT NULL,
42
+ `var` INT(4) DEFAULT NULL,
43
+ `val` INT(4) DEFAULT NULL
44
+ );
45
+
46
+ CREATE TABLE IF NOT EXISTS `vars` (
47
+ `id` INTEGER PRIMARY KEY,
48
+ `var_name` VARCHAR(20) NOT NULL UNIQUE
49
+ );
50
+
51
+ CREATE TABLE IF NOT EXISTS `var_values` (
52
+ `id` INTEGER PRIMARY KEY,
53
+ `var_value` VARCHAR(255) DEFAULT NULL UNIQUE
54
+ );
55
+
56
+ CREATE TABLE IF NOT EXISTS `sensors` (
57
+ `id` INTEGER PRIMARY KEY,
58
+ `name` VARCHAR(255) DEFAULT NULL UNIQUE
59
+ );
60
+
61
+ CREATE TABLE IF NOT EXISTS `geolocation` (
62
+ `id` INTEGER PRIMARY KEY,
63
+ `ip` VARCHAR(15) DEFAULT NULL UNIQUE,
64
+ `country_name` VARCHAR(45) DEFAULT '',
65
+ `country_iso_code` VARCHAR(2) DEFAULT '',
66
+ `city_name` VARCHAR(128) DEFAULT '',
67
+ `org` VARCHAR(128) DEFAULT '',
68
+ `org_asn` INT(11) DEFAULT NULL
69
+ );
@@ -0,0 +1,103 @@
1
+ # Sending the output of the honeypot to a Telegram channel
2
+
3
+ - [Sending the output of the honeypot to a Telegram channel](#sending-the-output-of-the-honeypot-to-a-telegram-channel)
4
+ - [Prerequisites](#prerequisites)
5
+ - [Create a Telegram bot and get its token](#create-a-telegram-bot-and-get-its-token)
6
+ - [Get the chat ID of a channel](#get-the-chat-id-of-a-channel)
7
+ - [Configure the honeypot](#configure-the-honeypot)
8
+
9
+ ## Prerequisites
10
+
11
+ - Working honeypot installation
12
+ - The Telegram app installed on a mobile device
13
+ - A Telegram bot and its token
14
+ - A Telegram channel and its channel ID
15
+
16
+ ## Create a Telegram bot and get its token
17
+
18
+ 1. Install the Telegram app on a mobile device and register a phone number
19
+ there. It *has* to be a mobile phone number (a landline won't do) and you
20
+ *have* to have control of it. You must be able to receive voice calls and SMS
21
+ messages on it. Keep in mind that if you lose control of that phone number,
22
+ somebody else who gets control of it will be able to take over your Telegram
23
+ account. If, when registering your phone number, you get a message that an
24
+ internal error has occurred, wait a day or two and try again.
25
+ 1. Open the Telegram application then search for `@BotFather`. Make sure that
26
+ it is labeled as "Bot", or might might be some malicious Telegram user trying
27
+ to masquerade as it.
28
+ 1. Click Start
29
+ 1. Click Menu and select /newbot or type `/newbot` and hit Send
30
+ 1. Follow the instructions until you get message like this
31
+
32
+ ```@BotFather
33
+ Done! Congratulations on your new bot. You will find it at t.me/new_bot.
34
+ You can now add a description.....
35
+
36
+ Use this token to access the HTTP API:
37
+ 63xxxxxx71:AAFoxxxxn0hwA-2TVSxxxNf4c
38
+ Keep your token secure and store it safely, it can be used by anyone to control your bot.
39
+
40
+ For a description of the Bot API, see this page: https://core.telegram.org/bots/api
41
+ ```
42
+
43
+ <!-- markdownlint-disable MD029 -->
44
+ 6. Optionally, edit your bot's properties - permissions, screen name, etc.
45
+ 1. Your bot token is `63xxxxxx71:AAFoxxxxn0hwA-2TVSxxxNf4c`. Make sure to keep it
46
+ confidential because anyone who has it can take full control of the bot.
47
+ <!-- markdownlint-enable MD029 -->
48
+
49
+ ## Get the chat ID of a channel
50
+
51
+ 1. Create a Telegram channel and add the Telegram bot to it.
52
+ 1. Send a message to the channel. These two steps are important - if you
53
+ don't do them, you won't be getting meaningful information from the bot.
54
+ 1. Open this URL from a web browser `https://api.telegram.org/bot{your_bot_token}/getUpdates`.
55
+ Make sure to replace `{your_bot_token}` with the actual token for your bot
56
+ that was obtained in the previous section.
57
+ 1. You'll see a JSON response like
58
+
59
+ ```json
60
+ {
61
+ "ok": true,
62
+ "result": [
63
+ {
64
+ "update_id": 838xxxx36,
65
+ "channel_post": {...},
66
+ "chat": {
67
+ "id": -1001xxxxxx062,
68
+ "title": "....",
69
+ "type": "channel"
70
+ },
71
+ "date": 1703065989,
72
+ "text": "test"
73
+ }
74
+ }
75
+ ]
76
+ }
77
+ ```
78
+
79
+ <!-- markdownlint-disable MD029 -->
80
+ 5. Check the value of `result[0]["channel_post"]["chat"]["id"]` - it contains
81
+ the channel ID: `-1001xxxxxx062`
82
+ 1. Try sending a test message to the channel. Use your browser to access the
83
+ URL `https://api.telegram.org/bot{your_bot_token}/sendMessage?chat_id={your_channel_ID}&text=test123`.
84
+ Make sure to replace `{your_bot_token}` with the bot token obtained in the
85
+ first section and `{your_channel_id}` with the channel ID obtained in the
86
+ previous point.
87
+ 1. If the bot token and the chat ID are specified correctly, the message
88
+ `test123` will be displayed in the Telegram channel.
89
+ <!-- markdownlint-enable MD029 -->
90
+
91
+ ## Configure the honeypot
92
+
93
+ - Stop the honeypot, if it is running.
94
+ - Open the file `etc/honeypot.cfg` and uncomment the `[output_telegram]`
95
+ section in it.
96
+ - Set the variables `bot_token` and `chat_id` to the bot token and the channel
97
+ ID that you have obtained in the previous sections.
98
+ - Optionally, set the variable `delay` to something different than the default
99
+ value of `2.0`. This is the delay, in seconds, between any two messages sent
100
+ to the bot. Note that if this number is smaller than `1.0`, Telegram's rate
101
+ limiting will cause it to return `429 Too many requests` errors.
102
+ - Set the variable `enabled` to `true`.
103
+ - Launch the honeypot.
@@ -0,0 +1,415 @@
1
+ # DO NOT EDIT THIS FILE!
2
+ # Changes to default files will be lost on update and are difficult to
3
+ # manage and support.
4
+ #
5
+ # Please make any changes to system defaults by overriding them in
6
+ # honeypot.cfg
7
+ #
8
+ # To override a specific setting, copy the name of the stanza and
9
+ # setting to the file where you wish to override it.
10
+
11
+ # ============================================================================
12
+ # General Honeypot Options
13
+ # ============================================================================
14
+ [honeypot]
15
+
16
+ # Sensor name is used to identify this honeypot instance. Used by the database
17
+ # logging modules such as JSON.
18
+ #
19
+ # If not specified, the logging modules will instead use the host name of the
20
+ # server as the sensor name.
21
+ #
22
+ # (default: the name of the local machine)
23
+ #sensor_name = myhostname
24
+
25
+ # MongoDB version to simulate. Default: 8.0.9
26
+ #version = 8.0.9
27
+
28
+ # Directory where to save log files in.
29
+ # Log files are named <log_filename>.YYYY-MM-DD in that directory
30
+ #
31
+ # (default: log)
32
+ log_path = log
33
+
34
+ # Log file name
35
+ #
36
+ # (default: stdout)
37
+ #log_filename =
38
+
39
+ # ============================================================================
40
+ # Network Specific Options
41
+ # ============================================================================
42
+
43
+ # Port to listen for incoming connections.
44
+ #
45
+ # (default: 27017)
46
+ #listen_port = 27017
47
+
48
+ # Site to query for one's public IP address
49
+ #
50
+ # (default: https://ident.me)
51
+ #public_ip_url = https://ident.me
52
+
53
+ # Enable to log the public IP of the honeypot (useful if listening on 127.0.0.1)
54
+ # IP address is obtained by querying public_ip_url
55
+ #
56
+ # (default: false)
57
+ #report_public_ip = false
58
+
59
+ # A comma-separated list of networks, connection from whose IPs won't be logged
60
+ #
61
+ # (default: 127.0.0.1,192.168.0.0/16)
62
+ #blacklist=127.0.0.1,192.168.0.0/16
63
+ blacklist=
64
+
65
+
66
+ # ============================================================================
67
+ # Output Plugins
68
+ # These provide an extensible mechanism to send audit log entries to third
69
+ # parties. The audit entries contain information on clients connecting to
70
+ # the honeypot.
71
+ #
72
+ # Output entries need to start with 'output_' and have the 'enabled' entry.
73
+ # ============================================================================
74
+
75
+ # CouchDB logging module
76
+ #
77
+ #[output_couch]
78
+ #enabled = false
79
+ #host = localhost
80
+ #port = 5984
81
+ #username = pgsqlpot
82
+ #password = secret
83
+ #database = pgsqlpot
84
+ #geoip = true
85
+ # Location of the databases used for geolocation
86
+ #geoip_citydb = data/GeoLite2-City.mmdb
87
+ #geoip_asndb = data/GeoLite2-ASN.mmdb
88
+
89
+ # Datadog output module
90
+ # sends JSON directly to Datadog
91
+ # mandatory field: api_key
92
+ # optional fields (fallback configured in module): ddsource, ddtags, service
93
+ # For more information on fields https://docs.datadoghq.com/api/latest/logs/#send-logs
94
+ #
95
+ #[output_datadog]
96
+ #enabled = false
97
+ #url = https://http-intake.logs.datadoghq.com/api/v2/logs
98
+ #api_key = abcdef1234567890fedcba0987654321
99
+ #ddsource = pgsqlpot
100
+ #ddtags = env:dev
101
+ #service = honeypot
102
+ # Host from which the logs are connected, default - current hostname
103
+ #hostname = pandora.nlcv.bas.bg
104
+
105
+ # Send output to a Discord webhook
106
+ #
107
+ #[output_discord]
108
+ #enabled = false
109
+ # Delay between messages (for rate limiting)
110
+ #delay = 2.0
111
+ #url = https://discord.com/api/webhooks/id/token
112
+
113
+ # Elasticsearch logging module
114
+ #
115
+ #[output_elastic]
116
+ #enabled = false
117
+ #host = localhost
118
+ #port = 9200
119
+ #index = pgsqlpot
120
+ #
121
+ # set pipeline = geoip to map src_ip to
122
+ # geo location data. You can use a custom
123
+ # pipeline but you must ensure it exists
124
+ # in elasticsearch.
125
+ #
126
+ #pipeline = geoip
127
+ #
128
+ # Authentication. When x-pack.security is enabled
129
+ # in ES, default users have been created and requests
130
+ # must be authenticated.
131
+ #
132
+ # Credentials
133
+ #
134
+ #username = pgsqlpot
135
+ #password = secret
136
+ #
137
+ # TLS encryption. Communications between the client (pgsqlpot)
138
+ # and the ES server should naturally be protected by encryption
139
+ # if requests are authenticated (to prevent from man-in-the-middle
140
+ # attacks). The following options are then paramount
141
+ # if username and password are provided.
142
+ #
143
+ # use ssl/tls
144
+ #ssl = true
145
+ # verify SSL certificates
146
+ #verify_certs = true
147
+ # Path to trusted CA certs on disk
148
+ #ca_certs = /path/to/cert/file/elastic_ca.crt
149
+
150
+ # HPFeeds
151
+ #
152
+ # Note the lack of "s" at the end:
153
+ #[output_hpfeed]
154
+ #enabled = false
155
+ #server = hpfeeds.mysite.org
156
+ #tlscert = /path/to/tls/cert/file
157
+ #port = 10000
158
+ #identifier = abc123
159
+ #secret = secret
160
+ #channel = pgsqlpot
161
+
162
+ # InfluxDB 2.0 logging module
163
+ #
164
+ #[output_influx2]
165
+ #enabled = false
166
+ #host = hostname
167
+ #token = token
168
+ #org = organization
169
+ #bucket = pgsqlpot
170
+
171
+ # JSON based logging module
172
+ #
173
+ [output_jsonlog]
174
+ enabled = true
175
+ logfile = log/pgsqlpot.json
176
+ epoch_timestamp = true
177
+
178
+ # Kafka logging module
179
+ #
180
+ #[output_kafka]
181
+ #enabled = false
182
+ #host = 127.0.0.1
183
+ #port = 9092
184
+ #topic = pgsqlpot
185
+ #username =
186
+ #password =
187
+ #debug = false
188
+
189
+ # MongoDB logging module
190
+ #
191
+ #[output_mongodb]
192
+ #enabled = false
193
+ #host = 127.0.0.1
194
+ #username = pgsqlpot
195
+ #password = secret
196
+ #database = pgsqlpot
197
+ # Note: .format(username, password, host) is done on the following string,
198
+ # so make sure that there are exactly 3 placeholders ({}) in it
199
+ #connection_string = mongodb+srv://{}:{}@{}/?retryWrites=true&w=majority&appName=Cluster0
200
+ # Whether to store geolocation data in the database
201
+ #geoip = true
202
+ # Location of the databases used for geolocation
203
+ #geoip_citydb = data/GeoLite2-City.mmdb
204
+ #geoip_asndb = data/GeoLite2-ASN.mmdb
205
+
206
+ # MySQL logging module
207
+ # Database structure for this module is supplied in docs/sql/mysql.sql
208
+ #
209
+ # MySQL logging requires extra software: sudo apt-get install libmysqlclient-dev
210
+ # MySQL logging requires an extra Python module: pip install mysql-python
211
+ #
212
+ #[output_mysql]
213
+ #enabled = false
214
+ #host = localhost
215
+ #database = pgsqlpot
216
+ #username = pgsqlpot
217
+ #password = secret
218
+ #port = 3306
219
+ #debug = false
220
+ # Whether to store geolocation data in the database
221
+ #geoip = true
222
+ # Location of the databases used for geolocation
223
+ #geoip_citydb = data/GeoLite2-City.mmdb
224
+ #geoip_asndb = data/GeoLite2-ASN.mmdb
225
+
226
+ # NLCV-BAS honeypot data aggregation API
227
+ #
228
+ #[output_nlcvapi]
229
+ #enabled = false
230
+ #host = https://api.nlcv.bas.bg/v1.0/honeypot
231
+ # Whether to store geolocation data in the database
232
+ #geoip = true
233
+ # Location of the databases used for geolocation
234
+ #geoip_citydb = data/GeoLite2-City.mmdb
235
+ #geoip_asndb = data/GeoLite2-ASN.mmdb
236
+
237
+ # PostgreSQL logging module
238
+ #
239
+ #[output_postgres]
240
+ #enabled = false
241
+ #host = hostname
242
+ #username = pgsqlpot
243
+ #password = secret
244
+ #port = 5432
245
+ #database = pgsqlpot
246
+ #debug = false
247
+ # Whether to store geolocation data in the database
248
+ #geoip = true
249
+ # Location of the databases used for geolocation
250
+ #geoip_citydb = data/GeoLite2-City.mmdb
251
+ #geoip_asndb = data/GeoLite2-ASN.mmdb
252
+
253
+ # RedisDB logging module
254
+ #
255
+ #[output_redisdb]
256
+ #enabled = false
257
+ #debug = true
258
+ #host = 127.0.0.1
259
+ #port = 27017
260
+ # DB of the redis server. Defaults to 0
261
+ #db = 0
262
+ # Password of the redis server. Defaults to None
263
+ #password = secret
264
+ # Name of the list to push to or the channel to publish to. Required
265
+ #keyname = pgsqlpot
266
+ # Method to use when sending data to redis.
267
+ # Can be one of [lpush, rpush, publish]. Defaults to lpush
268
+ #send_method = lpush
269
+
270
+ # Rethinkdb output module
271
+ #
272
+ #[output_rethinkdblog]
273
+ #enabled = false
274
+ #host = 127.0.0.1
275
+ #port = 28015
276
+ #table = events
277
+ #db = pgsqlpot
278
+ #user = admin
279
+ #password =
280
+
281
+ # Slack logging module
282
+ # This will produce a _lot_ of messages - you have been warned....
283
+ #
284
+ #[output_slack]
285
+ #enabled = false
286
+ #channel = channel_that_events_should_be_posted_in
287
+ #token = slack_token_for_your_bot
288
+ # Delay between messages (for rate limiting)
289
+ #delay = 1.2
290
+
291
+ # Socket logging module
292
+ #
293
+ #[output_socketlog]
294
+ #enabled = false
295
+ #address = 127.0.0.1:9000
296
+ #timeout = 5
297
+
298
+ # SQLite3 logging module
299
+ #
300
+ # Logging to SQLite3 database. To init the database, use the script
301
+ # docs/sql/sqlite3.sql:
302
+ # sqlite3 <db_file> < docs/sql/sqlite3.sql
303
+ #
304
+ #[output_sqlite]
305
+ #enabled = false
306
+ #debug = false
307
+ #db_file = data/pgsqlpot.db
308
+ # Whether to store geolocation data in the database
309
+ #geoip = true
310
+ # Location of the databases used for geolocation
311
+ #geoip_citydb = data/GeoLite2-City.mmdb
312
+ #geoip_asndb = data/GeoLite2-ASN.mmdb
313
+
314
+ # Local Syslog output module
315
+ #
316
+ # This sends log messages to the local syslog daemon.
317
+ #
318
+ #[output_localsyslog]
319
+ #enabled = false
320
+ # Facility can be:
321
+ # KERN, USER, MAIL, DAEMON, AUTH, LPR, NEWS, UUCP, CRON, SYSLOG and LOCAL0 to LOCAL7.
322
+ #
323
+ # default: USER
324
+ #facility = USER
325
+
326
+ # Send message using Telegram bot
327
+ # 1. Create a bot following https://core.telegram.org/bots#6-botfather to get token.
328
+ # 2. Send message to your bot, then use https://api.telegram.org/bot{bot_token}/getUpdates to find chat_id.
329
+ #
330
+ #[output_telegram]
331
+ #enabled = false
332
+ #bot_token = 123456789:AbCDEfGhiJkLmnOpQRstUVWxYZ
333
+ #chat_id = 987654321
334
+ # Delay between messages (for rate limiting)
335
+ #delay = 2.0
336
+
337
+ # Text output
338
+ # This writes audit log entries to a text file
339
+ #
340
+ #[output_textlog]
341
+ #enabled = false
342
+ #logfile = log/pgsqlpot.txt
343
+
344
+ # XMPP logging module
345
+ #
346
+ #[output_xmpp]
347
+ #enabled=false
348
+ #server = conference.pgsqlpot.local
349
+ #user = pgsqlpot@pgsqlpot.local
350
+ #password = secret
351
+ #muc = hacker_room
352
+
353
+
354
+ # TODO:
355
+
356
+ # Send login attemp information to SANS DShield
357
+ # See https://isc.sans.edu/ssh.html
358
+ # You must signup for an api key.
359
+ # Once registered, find your details at: https://isc.sans.edu/myaccount.html
360
+ #
361
+ #[output_dshield]
362
+ #enabled = false
363
+ #userid = userid_here
364
+ #auth_key = auth_key_here
365
+ #batch_size = 100
366
+
367
+ # Graylog logging module for GELF http input
368
+ #
369
+ #[output_graylog]
370
+ #enabled = false
371
+ #url = http://graylog.example.com:122011/gelf
372
+
373
+ # InfluxDB logging module
374
+ #
375
+ #[output_influx]
376
+ #enabled = false
377
+ #host = 127.0.0.1
378
+ #port = 8086
379
+ #database_name = pgsqlpot
380
+ #retention_policy_duration = 30d
381
+
382
+ # Oracle Cloud custom logs output module
383
+ # sends JSON directly to Oracle Cloud custom logs
384
+ # mandatory field: authtype, log_ocid
385
+ # optional fields (to be set if user_principals is selected as authtype): user_ocid, fingerprint, tenancy_ocid, region, keyfile
386
+ # For more information on Oracle Cloud custom logs: https://docs.oracle.com/en-us/iaas/Content/Logging/Concepts/custom_logs.htm
387
+ # For more information on Oracle Cloud user principal authentication method: https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#five
388
+ # For more information on Oracle Cloud instance principal authentication method: https://blogs.oracle.com/developers/post/accessing-the-oracle-cloud-infrastructure-api-using-instance-principals
389
+ #
390
+ #[output_oraclecloud]
391
+ #enabled = false
392
+ # authtype must be set either to user_principals or to instance_principals
393
+ #authtype = instance_principals
394
+ # following parameters must be set in case user_principals is used. keyfile is the absolute path to your API pem key file.
395
+ #log_ocid = ocid1.log.oc1.eu-stockholm-1.xxx
396
+ #user_ocid = ocid1.user.oc1..xxx
397
+ #fingerprint = 77:9c:4xxxxx
398
+ #tenancy_ocid = ocid1.tenancy.oc1..xxx
399
+ #region = eu-stockholm-1
400
+ #keyfile = /home/xx/key.pem
401
+
402
+ # Splunk HTTP Event Collector (HEC) output module
403
+ # sends JSON directly to Splunk over HTTP or HTTPS
404
+ # Use 'https' if your HEC is encrypted, else 'http'
405
+ # mandatory fields: url, token
406
+ # optional fields: index, source, sourcetype, host
407
+ #
408
+ #[output_splunk]
409
+ #enabled = false
410
+ #url = https://localhost:8088/services/collector/event
411
+ #token = 6A0EA6C6-8006-4E39-FC44-C35FF6E561A8
412
+ #index = pgsqlpot
413
+ #sourcetype = pgsqlpot
414
+ #source = pgsqlpot
415
+