mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-19 21:52:27 +00:00
bump to latest master, optimize
This commit is contained in:
parent
1280bfd096
commit
8282084d49
6 changed files with 109 additions and 251 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.19
|
FROM alpine:3.20
|
||||||
#
|
#
|
||||||
# Include dist
|
# Include dist
|
||||||
COPY dist/ /root/dist/
|
COPY dist/ /root/dist/
|
||||||
|
@ -6,84 +6,34 @@ COPY dist/ /root/dist/
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apk --no-cache -U add \
|
RUN apk --no-cache -U add \
|
||||||
build-base \
|
build-base \
|
||||||
freetds \
|
|
||||||
freetds-dev \
|
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
hiredis \
|
|
||||||
jpeg-dev \
|
|
||||||
libcap \
|
libcap \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libpq \
|
|
||||||
musl-dev \
|
musl-dev \
|
||||||
openssl \
|
openssl \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
postgresql-dev \
|
|
||||||
py3-chardet \
|
|
||||||
py3-click \
|
|
||||||
py3-cryptography \
|
|
||||||
py3-dnspython \
|
|
||||||
py3-flask \
|
|
||||||
py3-future \
|
|
||||||
py3-hiredis \
|
|
||||||
py3-impacket \
|
|
||||||
py3-itsdangerous \
|
|
||||||
py3-jinja2 \
|
|
||||||
py3-ldap3 \
|
|
||||||
py3-markupsafe \
|
|
||||||
py3-netifaces \
|
|
||||||
py3-openssl \
|
|
||||||
py3-packaging \
|
|
||||||
py3-paramiko \
|
|
||||||
py3-pip \
|
py3-pip \
|
||||||
# py3-psutil \
|
|
||||||
py3-psycopg2 \
|
|
||||||
py3-pycryptodomex \
|
|
||||||
py3-requests \
|
|
||||||
py3-service_identity \
|
|
||||||
py3-twisted \
|
|
||||||
py3-werkzeug \
|
|
||||||
py3-wheel \
|
|
||||||
python3 \
|
python3 \
|
||||||
python3-dev \
|
python3-dev && \
|
||||||
zlib-dev && \
|
|
||||||
#
|
#
|
||||||
# Install honeypots from GitHub and setup
|
# Install honeypots from GitHub and setup
|
||||||
mkdir -p /opt \
|
pip3 install --break-system-packages --no-cache-dir honeypots && \
|
||||||
/var/log/honeypots && \
|
|
||||||
cd /opt/ && \
|
|
||||||
git clone https://github.com/qeeqbox/honeypots && \
|
|
||||||
cd honeypots && \
|
|
||||||
git checkout a990b2c1ab04ffafde229e478ced54ffbb665d5c && \
|
|
||||||
# git checkout 5b3bfbecbf85c1f5235b320b333bdeff2d312372 && \
|
|
||||||
# cp /root/dist/pyproject.toml . && \
|
|
||||||
pip3 install --break-system-packages --upgrade pip && \
|
|
||||||
pip3 install --break-system-packages . && \
|
|
||||||
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
|
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
|
||||||
#
|
#
|
||||||
# Setup user, groups and configs
|
# Setup user, groups and configs
|
||||||
addgroup -g 2000 honeypots && \
|
mkdir -p /etc/honeypots/ && \
|
||||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 honeypots && \
|
cp /root/dist/config.json /etc/honeypots/ && \
|
||||||
chown honeypots:honeypots -R /opt/honeypots && \
|
|
||||||
chown honeypots:honeypots -R /var/log/honeypots && \
|
|
||||||
mv /root/dist/config.json /opt/honeypots/ && \
|
|
||||||
#
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge build-base \
|
apk del --purge \
|
||||||
freetds-dev \
|
build-base \
|
||||||
git \
|
|
||||||
jpeg-dev \
|
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
|
musl-dev \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
postgresql-dev \
|
py3-pip \
|
||||||
python3-dev \
|
python3-dev && \
|
||||||
zlib-dev && \
|
|
||||||
rm -rf /root/* \
|
rm -rf /root/* \
|
||||||
/var/cache/apk/* \
|
|
||||||
/opt/honeypots/.git
|
|
||||||
#
|
#
|
||||||
# Start honeypots
|
# Start honeypots
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
USER honeypots:honeypots
|
USER 2000:2000
|
||||||
WORKDIR /opt/honeypots/
|
CMD python3 -E -m honeypots --setup all --config /etc/honeypots/config.json
|
||||||
CMD python3 -E -m honeypots --setup all --config config.json
|
|
||||||
|
|
87
docker/honeypots/Dockerfile.old
Normal file
87
docker/honeypots/Dockerfile.old
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
FROM alpine:3.20
|
||||||
|
#
|
||||||
|
# Include dist
|
||||||
|
COPY dist/ /root/dist/
|
||||||
|
#
|
||||||
|
# Install packages
|
||||||
|
RUN apk --no-cache -U add \
|
||||||
|
build-base \
|
||||||
|
freetds \
|
||||||
|
freetds-dev \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
hiredis \
|
||||||
|
jpeg-dev \
|
||||||
|
libcap \
|
||||||
|
libffi-dev \
|
||||||
|
libpq \
|
||||||
|
musl-dev \
|
||||||
|
openssl \
|
||||||
|
openssl-dev \
|
||||||
|
postgresql-dev \
|
||||||
|
py3-chardet \
|
||||||
|
py3-click \
|
||||||
|
py3-cryptography \
|
||||||
|
py3-dnspython \
|
||||||
|
py3-flask \
|
||||||
|
py3-future \
|
||||||
|
py3-hiredis \
|
||||||
|
py3-impacket \
|
||||||
|
py3-itsdangerous \
|
||||||
|
py3-jinja2 \
|
||||||
|
py3-ldap3 \
|
||||||
|
py3-markupsafe \
|
||||||
|
py3-netifaces \
|
||||||
|
py3-openssl \
|
||||||
|
py3-packaging \
|
||||||
|
py3-paramiko \
|
||||||
|
py3-pip \
|
||||||
|
# py3-psutil \
|
||||||
|
py3-psycopg2 \
|
||||||
|
py3-pycryptodomex \
|
||||||
|
py3-requests \
|
||||||
|
py3-service_identity \
|
||||||
|
py3-twisted \
|
||||||
|
py3-werkzeug \
|
||||||
|
py3-wheel \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
zlib-dev && \
|
||||||
|
#
|
||||||
|
# Install honeypots from GitHub and setup
|
||||||
|
mkdir -p /opt \
|
||||||
|
/var/log/honeypots && \
|
||||||
|
cd /opt/ && \
|
||||||
|
git clone https://github.com/qeeqbox/honeypots && \
|
||||||
|
cd honeypots && \
|
||||||
|
git checkout 7283529c1773c6fc26e072fa9c78074d66fe9fa6 && \
|
||||||
|
pip3 install --break-system-packages --upgrade pip && \
|
||||||
|
pip3 install --break-system-packages . && \
|
||||||
|
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
|
||||||
|
#
|
||||||
|
# Setup user, groups and configs
|
||||||
|
addgroup -g 2000 honeypots && \
|
||||||
|
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 honeypots && \
|
||||||
|
chown honeypots:honeypots -R /opt/honeypots && \
|
||||||
|
chown honeypots:honeypots -R /var/log/honeypots && \
|
||||||
|
mv /root/dist/config.json /opt/honeypots/ && \
|
||||||
|
#
|
||||||
|
# Clean up
|
||||||
|
apk del --purge build-base \
|
||||||
|
freetds-dev \
|
||||||
|
git \
|
||||||
|
jpeg-dev \
|
||||||
|
libffi-dev \
|
||||||
|
openssl-dev \
|
||||||
|
postgresql-dev \
|
||||||
|
python3-dev \
|
||||||
|
zlib-dev && \
|
||||||
|
rm -rf /root/* \
|
||||||
|
/var/cache/apk/* \
|
||||||
|
/opt/honeypots/.git
|
||||||
|
#
|
||||||
|
# Start honeypots
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
|
USER honeypots:honeypots
|
||||||
|
WORKDIR /opt/honeypots/
|
||||||
|
CMD python3 -E -m honeypots --setup all --config config.json
|
9
docker/honeypots/dist/config.json
vendored
9
docker/honeypots/dist/config.json
vendored
|
@ -8,6 +8,15 @@
|
||||||
"filter":"",
|
"filter":"",
|
||||||
"interface":"",
|
"interface":"",
|
||||||
"honeypots":{
|
"honeypots":{
|
||||||
|
"dhcp":{
|
||||||
|
"port":67,
|
||||||
|
"ip":"0.0.0.0",
|
||||||
|
"username":"administrator",
|
||||||
|
"password":"123456",
|
||||||
|
"log_file_name":"dhcp.log",
|
||||||
|
"max_bytes":0,
|
||||||
|
"backup_count":10
|
||||||
|
},
|
||||||
"dns":{
|
"dns":{
|
||||||
"port":53,
|
"port":53,
|
||||||
"ip":"0.0.0.0",
|
"ip":"0.0.0.0",
|
||||||
|
|
150
docker/honeypots/dist/pyproject.toml
vendored
150
docker/honeypots/dist/pyproject.toml
vendored
|
@ -1,150 +0,0 @@
|
||||||
[build-system]
|
|
||||||
requires = [
|
|
||||||
"setuptools>=61.2",
|
|
||||||
]
|
|
||||||
build-backend = "setuptools.build_meta"
|
|
||||||
|
|
||||||
[project]
|
|
||||||
name = "honeypots"
|
|
||||||
version = "0.65"
|
|
||||||
authors = [
|
|
||||||
{ name = "QeeqBox", email = "gigaqeeq@gmail.com" },
|
|
||||||
]
|
|
||||||
description = "30 different honeypots in one package! (dhcp, dns, elastic, ftp, http proxy, https proxy, http, https, imap, ipp, irc, ldap, memcache, mssql, mysql, ntp, oracle, pjl, pop3, postgres, rdp, redis, sip, smb, smtp, snmp, socks5, ssh, telnet, vnc)"
|
|
||||||
readme = "README.rst"
|
|
||||||
requires-python = ">=3.8"
|
|
||||||
dependencies = [
|
|
||||||
"twisted",
|
|
||||||
"psutil",
|
|
||||||
"psycopg2-binary",
|
|
||||||
"pycryptodome",
|
|
||||||
"requests",
|
|
||||||
"requests[socks]",
|
|
||||||
"impacket",
|
|
||||||
"paramiko",
|
|
||||||
"scapy",
|
|
||||||
"service_identity",
|
|
||||||
"netifaces",
|
|
||||||
]
|
|
||||||
license = {text = "AGPL-3.0"}
|
|
||||||
|
|
||||||
[project.urls]
|
|
||||||
Homepage = "https://github.com/qeeqbox/honeypots"
|
|
||||||
|
|
||||||
[project.optional-dependencies]
|
|
||||||
dev = [
|
|
||||||
"dnspython==2.4.2",
|
|
||||||
"elasticsearch",
|
|
||||||
"ldap3",
|
|
||||||
"mysql-connector",
|
|
||||||
"pre-commit",
|
|
||||||
"pymssql",
|
|
||||||
"pysnmplib",
|
|
||||||
"pytest",
|
|
||||||
"redis",
|
|
||||||
"redis",
|
|
||||||
"vncdotool",
|
|
||||||
]
|
|
||||||
|
|
||||||
[project.scripts]
|
|
||||||
honeypots = "honeypots.__main__:main_logic"
|
|
||||||
|
|
||||||
[tool.setuptools]
|
|
||||||
packages = [
|
|
||||||
"honeypots",
|
|
||||||
"honeypots.data",
|
|
||||||
]
|
|
||||||
include-package-data = true
|
|
||||||
|
|
||||||
[tool.setuptools.package-data]
|
|
||||||
"honeypots.data" = [
|
|
||||||
"*.html",
|
|
||||||
]
|
|
||||||
|
|
||||||
[tool.ruff]
|
|
||||||
select = [
|
|
||||||
"F",
|
|
||||||
"E",
|
|
||||||
"W",
|
|
||||||
"C90",
|
|
||||||
"N",
|
|
||||||
"UP",
|
|
||||||
"B",
|
|
||||||
"A",
|
|
||||||
"C4",
|
|
||||||
"EXE",
|
|
||||||
"FA",
|
|
||||||
"ISC",
|
|
||||||
"PIE",
|
|
||||||
"T20",
|
|
||||||
"PT",
|
|
||||||
"Q",
|
|
||||||
"RET",
|
|
||||||
"SIM",
|
|
||||||
"TCH",
|
|
||||||
"ARG",
|
|
||||||
"PTH",
|
|
||||||
"ERA",
|
|
||||||
"PL",
|
|
||||||
"PLR",
|
|
||||||
"PLW",
|
|
||||||
"PERF",
|
|
||||||
"RUF",
|
|
||||||
]
|
|
||||||
ignore = [
|
|
||||||
"A003",
|
|
||||||
"PERF203",
|
|
||||||
"PERF401",
|
|
||||||
"RUF001",
|
|
||||||
"RUF002",
|
|
||||||
"RUF003",
|
|
||||||
"RUF015",
|
|
||||||
# pydantic only supports these from python>=3.9
|
|
||||||
"UP006",
|
|
||||||
"UP007",
|
|
||||||
# rules may cause conflicts when used with the formatter
|
|
||||||
"ISC001",
|
|
||||||
"Q001",
|
|
||||||
]
|
|
||||||
fixable = [
|
|
||||||
"F",
|
|
||||||
"E",
|
|
||||||
"W",
|
|
||||||
"C90",
|
|
||||||
"N",
|
|
||||||
"UP",
|
|
||||||
"B",
|
|
||||||
"A",
|
|
||||||
"C4",
|
|
||||||
"EXE",
|
|
||||||
"FA",
|
|
||||||
"ISC",
|
|
||||||
"PIE",
|
|
||||||
"T20",
|
|
||||||
"PT",
|
|
||||||
"Q",
|
|
||||||
"RET",
|
|
||||||
"SIM",
|
|
||||||
"TCH",
|
|
||||||
"ARG",
|
|
||||||
"PTH",
|
|
||||||
"ERA",
|
|
||||||
"PL",
|
|
||||||
"PLR",
|
|
||||||
"PLW",
|
|
||||||
"PERF",
|
|
||||||
"RUF",
|
|
||||||
]
|
|
||||||
exclude = [
|
|
||||||
".git",
|
|
||||||
".ruff_cache",
|
|
||||||
".venv",
|
|
||||||
"venv",
|
|
||||||
"data",
|
|
||||||
]
|
|
||||||
line-length = 99
|
|
||||||
target-version = "py38"
|
|
||||||
|
|
||||||
[tool.ruff.lint.per-file-ignores]
|
|
||||||
# don't check for "magic value" in tests
|
|
||||||
"tests/*" = ["PLR2004"]
|
|
39
docker/honeypots/dist/setup.py
vendored
39
docker/honeypots/dist/setup.py
vendored
|
@ -1,39 +0,0 @@
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
with open("README.rst", "r") as f:
|
|
||||||
long_description = f.read()
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='honeypots',
|
|
||||||
author='QeeqBox',
|
|
||||||
author_email='gigaqeeq@gmail.com',
|
|
||||||
description=r"23 different honeypots in a single pypi package! (dns, ftp, httpproxy, http, https, imap, mysql, pop3, postgres, redis, smb, smtp, socks5, ssh, telnet, vnc, mssql, elastic, ldap, ntp, memcache, snmp, oracle, sip and irc) ",
|
|
||||||
long_description=long_description,
|
|
||||||
version='0.51',
|
|
||||||
license="AGPL-3.0",
|
|
||||||
license_files=('LICENSE'),
|
|
||||||
url="https://github.com/qeeqbox/honeypots",
|
|
||||||
packages=['honeypots'],
|
|
||||||
entry_points={
|
|
||||||
"console_scripts": [
|
|
||||||
'honeypots=honeypots.__main__:main_logic'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
include_package_data=True,
|
|
||||||
install_requires=[
|
|
||||||
'pycrypto',
|
|
||||||
'scapy',
|
|
||||||
'twisted',
|
|
||||||
'psutil',
|
|
||||||
'psycopg2-binary',
|
|
||||||
'requests',
|
|
||||||
'impacket',
|
|
||||||
'paramiko',
|
|
||||||
'service_identity',
|
|
||||||
'netifaces'
|
|
||||||
],
|
|
||||||
extras_require={
|
|
||||||
'test': ['redis', 'mysql-connector', 'elasticsearch', 'pymssql', 'ldap3', 'pysnmp']
|
|
||||||
},
|
|
||||||
python_requires='>=3.5'
|
|
||||||
)
|
|
|
@ -22,6 +22,7 @@ services:
|
||||||
- "23:23"
|
- "23:23"
|
||||||
- "25:25"
|
- "25:25"
|
||||||
- "53:53/udp"
|
- "53:53/udp"
|
||||||
|
- "67:67/udp"
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "110:110"
|
- "110:110"
|
||||||
- "123:123"
|
- "123:123"
|
||||||
|
|
Loading…
Reference in a new issue