2019-01-09 08:05:16 +00:00
|
|
|
Using TCP tunneling with Squid
|
|
|
|
#################################
|
2018-03-27 07:58:32 +00:00
|
|
|
|
|
|
|
|
2019-01-09 08:05:16 +00:00
|
|
|
Prerequisites
|
|
|
|
=============
|
2018-03-27 07:58:32 +00:00
|
|
|
|
|
|
|
* Working Cowrie installation
|
|
|
|
* Working Squid installation with CONNECT allowed
|
|
|
|
* (optional) Rate limit and black/white lists in Squid
|
|
|
|
|
|
|
|
|
2019-01-09 08:05:16 +00:00
|
|
|
Installation
|
|
|
|
============
|
2018-03-27 07:58:32 +00:00
|
|
|
|
2021-05-03 15:42:25 +00:00
|
|
|
|
|
|
|
Install Squid::
|
|
|
|
|
|
|
|
$ sudo apt-get install squid
|
2018-03-27 07:58:32 +00:00
|
|
|
|
|
|
|
|
2019-01-09 08:05:16 +00:00
|
|
|
Squid Configuration
|
|
|
|
===================
|
2018-03-27 07:58:32 +00:00
|
|
|
|
2021-05-03 15:42:25 +00:00
|
|
|
See ``squid.conf`` for an example configuration.
|
2018-03-27 07:58:32 +00:00
|
|
|
|
|
|
|
|
2019-01-09 08:05:16 +00:00
|
|
|
Cowrie Configuration
|
|
|
|
====================
|
2018-03-27 07:58:32 +00:00
|
|
|
|
2021-05-03 15:42:25 +00:00
|
|
|
Uncomment and update the following entries to ~/cowrie/cowrie.cfg under the SSH section::
|
2018-03-27 07:58:32 +00:00
|
|
|
|
2021-05-03 15:42:25 +00:00
|
|
|
forward_tunnel = true
|
|
|
|
forward_tunnel_80 = 127.0.0.1:3128
|
|
|
|
forward_tunnel_443 = 127.0.0.1:3128
|
2018-03-27 07:58:32 +00:00
|
|
|
|
|
|
|
## Restart Cowrie
|
|
|
|
|
2021-05-03 15:42:25 +00:00
|
|
|
Restart::
|
|
|
|
|
|
|
|
$ bin/cowrie restart
|