You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The backend and honey front-end start successfully.
I can successfully access the front-end at http://localhost:5000.
I attempted to telnet using "telnet 127.0.0.1 2323" and the session was successful.
I ended the telnet session but no data is pushed to the database.
Data is pushed to the logfile I configured in config.dist.yaml.
The following error on the honeypot.py terminal after closing the telnet session:
~/telnet-iot-honeypot$ python honeypot.py
/home/atr/.local/lib/python2.7/site-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
2019-03-08 08:01:53 telnet.py:86 Socket open on :2323
2019-03-08 08:02:00 telnet.py:99 Client connected at ('127.0.0.1', 58430)
2019-03-08 08:02:00 session.py:24 New Session
2019-03-08 08:02:00 telnet.py:127 Setting timeout to 60 seconds
2019-03-08 08:02:09 session.py:37 Session login: user=aaa password=aaa
2019-03-08 08:02:26 telnet.py:161 Connection closed
2019-03-08 08:02:26 session.py:68 Session End
2019-03-08 08:02:26 client.py:44 Backend upload failed, retrying ()
Unhandled exception in thread started by <bound method TelnetSess.loop of <honeypot.telnet.TelnetSess instance at 0x7fb164e4b0e0>>
Traceback (most recent call last):
File "/home/atr/telnet-iot-honeypot/honeypot/telnet.py", line 163, in loop
self.session.end()
File "/home/atr/telnet-iot-honeypot/honeypot/session.py", line 76, in end
self.record.commit()
File "/home/atr/telnet-iot-honeypot/honeypot/sampledb_client.py", line 134, in commit
upload_req = self.back.put_session(self.json())
File "/home/atr/telnet-iot-honeypot/honeypot/client.py", line 45, in put_session
return self.put_session(session, False)
File "/home/atr/telnet-iot-honeypot/honeypot/client.py", line 48, in put_session
raise
And this is the error on the screen running backend.py:
~/telnet-iot-honeypot$ python backend.py
/home/atr/.local/lib/python2.7/site-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
Creating/Connecting to DB
DB Setup done
Restarting with stat
/home/atr/.local/lib/python2.7/site-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
Creating/Connecting to DB
DB Setup done
Debugger is active!
Debugger PIN: 293-544-861
(12730) wsgi starting up on http://127.0.0.1:5000
(12730) accepted ('127.0.0.1', 42704)
Traceback (most recent call last):
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/atr/.local/lib/python2.7/site-packages/flask_httpauth.py", line 104, in decorated
return f(*args, **kwargs)
File "/home/atr/telnet-iot-honeypot/backend/backend.py", line 108, in put_conn
session = ctrl.put_session(session)
File "</home/atr/.local/lib/python2.7/site-packages/decorator.pyc:decorator-gen-6>", line 2, in put_session
File "/home/atr/telnet-iot-honeypot/backend/db.py", line 31, in db_wrapper
return func(*args, **kwargs)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 230, in put_session
range = self.get_ip_range(conn.ip)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 168, in get_ip_range
return self.get_ip_range_online(ip)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 156, in get_ip_range_online
range.country = addinfo["country"]
TypeError: 'NoneType' object has no attribute 'getitem'
127.0.0.1 - - [08/Mar/2019 08:03:02] "PUT /conns HTTP/1.1" 500 24562 0.103092
(12730) accepted ('127.0.0.1', 42706)
Traceback (most recent call last):
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/atr/.local/lib/python2.7/site-packages/flask_httpauth.py", line 104, in decorated
return f(*args, **kwargs)
File "/home/atr/telnet-iot-honeypot/backend/backend.py", line 108, in put_conn
session = ctrl.put_session(session)
File "</home/atr/.local/lib/python2.7/site-packages/decorator.pyc:decorator-gen-6>", line 2, in put_session
File "/home/atr/telnet-iot-honeypot/backend/db.py", line 31, in db_wrapper
return func(*args, **kwargs)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 230, in put_session
range = self.get_ip_range(conn.ip)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 168, in get_ip_range
return self.get_ip_range_online(ip)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 156, in get_ip_range_online
range.country = addinfo["country"]
TypeError: 'NoneType' object has no attribute 'getitem'
127.0.0.1 - - [08/Mar/2019 08:03:02] "PUT /conns HTTP/1.1" 500 24562 0.032411
Any idea?
The text was updated successfully, but these errors were encountered:
Ok, that was a obvious bug i should have tested when rebuilding the ip lookup. Should work with the latest commit. Problem was just that 127.0.0.1 has no ASN lookup obviously.
Ubuntu 16.04.2 LTS
Cloned and manually installed the current version using the steps on the website:
apt-get install -y python-pip libmysqlclient-dev python-mysqldb git sqlite3
git clone https://github.com/Phype/telnet-iot-honeypot.git
cd telnet-iot-honeypot
pip install -r requirements.txt
sudo apt-get install python-setuptools python-werkzeug
python-flask python-flask-httpauth python-sqlalchemy
python-requests python-decorator python-dnspython
python-ipaddress python-simpleeval python-yaml
bash create_config.sh
python backend.py
python honeypot.py
The backend and honey front-end start successfully.
I can successfully access the front-end at http://localhost:5000.
I attempted to telnet using "telnet 127.0.0.1 2323" and the session was successful.
I ended the telnet session but no data is pushed to the database.
Data is pushed to the logfile I configured in config.dist.yaml.
The following error on the honeypot.py terminal after closing the telnet session:
~/telnet-iot-honeypot$ python honeypot.py
/home/atr/.local/lib/python2.7/site-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
2019-03-08 08:01:53 telnet.py:86 Socket open on :2323
2019-03-08 08:02:00 telnet.py:99 Client connected at ('127.0.0.1', 58430)
2019-03-08 08:02:00 session.py:24 New Session
2019-03-08 08:02:00 telnet.py:127 Setting timeout to 60 seconds
2019-03-08 08:02:09 session.py:37 Session login: user=aaa password=aaa
2019-03-08 08:02:26 telnet.py:161 Connection closed
2019-03-08 08:02:26 session.py:68 Session End
2019-03-08 08:02:26 client.py:44 Backend upload failed, retrying ()
Unhandled exception in thread started by <bound method TelnetSess.loop of <honeypot.telnet.TelnetSess instance at 0x7fb164e4b0e0>>
Traceback (most recent call last):
File "/home/atr/telnet-iot-honeypot/honeypot/telnet.py", line 163, in loop
self.session.end()
File "/home/atr/telnet-iot-honeypot/honeypot/session.py", line 76, in end
self.record.commit()
File "/home/atr/telnet-iot-honeypot/honeypot/sampledb_client.py", line 134, in commit
upload_req = self.back.put_session(self.json())
File "/home/atr/telnet-iot-honeypot/honeypot/client.py", line 45, in put_session
return self.put_session(session, False)
File "/home/atr/telnet-iot-honeypot/honeypot/client.py", line 48, in put_session
raise
And this is the error on the screen running backend.py:
~/telnet-iot-honeypot$ python backend.py
/home/atr/.local/lib/python2.7/site-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
Creating/Connecting to DB
DB Setup done
/home/atr/.local/lib/python2.7/site-packages/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
Creating/Connecting to DB
DB Setup done
(12730) wsgi starting up on http://127.0.0.1:5000
(12730) accepted ('127.0.0.1', 42704)
Traceback (most recent call last):
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/atr/.local/lib/python2.7/site-packages/flask_httpauth.py", line 104, in decorated
return f(*args, **kwargs)
File "/home/atr/telnet-iot-honeypot/backend/backend.py", line 108, in put_conn
session = ctrl.put_session(session)
File "</home/atr/.local/lib/python2.7/site-packages/decorator.pyc:decorator-gen-6>", line 2, in put_session
File "/home/atr/telnet-iot-honeypot/backend/db.py", line 31, in db_wrapper
return func(*args, **kwargs)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 230, in put_session
range = self.get_ip_range(conn.ip)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 168, in get_ip_range
return self.get_ip_range_online(ip)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 156, in get_ip_range_online
range.country = addinfo["country"]
TypeError: 'NoneType' object has no attribute 'getitem'
127.0.0.1 - - [08/Mar/2019 08:03:02] "PUT /conns HTTP/1.1" 500 24562 0.103092
(12730) accepted ('127.0.0.1', 42706)
Traceback (most recent call last):
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/home/atr/.local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/atr/.local/lib/python2.7/site-packages/flask_httpauth.py", line 104, in decorated
return f(*args, **kwargs)
File "/home/atr/telnet-iot-honeypot/backend/backend.py", line 108, in put_conn
session = ctrl.put_session(session)
File "</home/atr/.local/lib/python2.7/site-packages/decorator.pyc:decorator-gen-6>", line 2, in put_session
File "/home/atr/telnet-iot-honeypot/backend/db.py", line 31, in db_wrapper
return func(*args, **kwargs)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 230, in put_session
range = self.get_ip_range(conn.ip)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 168, in get_ip_range
return self.get_ip_range_online(ip)
File "/home/atr/telnet-iot-honeypot/backend/clientcontroller.py", line 156, in get_ip_range_online
range.country = addinfo["country"]
TypeError: 'NoneType' object has no attribute 'getitem'
127.0.0.1 - - [08/Mar/2019 08:03:02] "PUT /conns HTTP/1.1" 500 24562 0.032411
Any idea?
The text was updated successfully, but these errors were encountered: