niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » BSD » OpenBSD
using pf for honey pots
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Gary
*nix forums beginner


Joined: 15 Jun 2006
Posts: 3

PostPosted: Fri Jun 23, 2006 7:31 pm    Post subject: using pf for honey pots Reply with quote

It's been a while since I've used pf extensively but I'm having trouble
sorting this one out. Is there a mailing list for pf users, btw? I'm
currently trying to get Tillman Werner's honeytrap[1] to compile but until
that's ready, I've come up with something else equally amusing.

In the mean time, I've taken an unpatched install of Windows XP Home SP1,
installed it under VMware, and am fwd'ing several ports to it. I was
having trouble singling out VM's IP to block its outbound traffic so my
temporary workaround was to run the Cisco VPN client which has a ZoneAlarm
engine packed with it. If I turn on the ZA firewall, traffic to/from the
guest OS works but traffic to the virtual is inbound only since ZA blocks
all outbound traffic from it. The end result is a lot of scans and failed
attempts by various bots, kiddies, and knuckleheads w/ no real results. No
spamming, either. A a recent rev nmap scan with will still show it's
fronted by a 3.X version of OpenBSD, however. I've also fwd'd a couple of
common exploits to other ports just to confuse them. Attached below is my
pf.conf.

My goal is to try to limit the virtual honey pot's outbound access to a
small handful of ports to prevent, among other things, spam, etc. But I
can seem to only block all traffic or none -- hence the ZA workaround in
the interim. Any feedback would be most welcome.

-Gary


ext_if="hme0"
int_if="xl0"
localnet = $int_if:network
# pot fulla honey!
winbox="172.16.75.30/32"
winports="{135,139,445,1025,5000}"
client_out= {ftp-data,ftp,ssh,domain,nntp,http,https}"

set skip on lo

scrub in

nat-anchor "ftp-proxy/*"
rdr-anchor "ftp-proxy/*"
nat on $ext_if from !($ext_if) -> ($ext_if:0)

rdr pass on $int_if proto tcp to port ftp -> 127.0.0.1 port 8021

# I smell honey -- do you?
rdr on $ext_if proto tcp from !$localnet to $ext_if port $winports -> $winbox
rdr on $ext_if proto udp from !$localnet to $ext_if port $winports -> $winbox
# fakeouts for Windows messaging, MS SQL, and NAV
rdr on $ext_if proto tcp from !$localnet to $ext_if port 1026 -> $winbox port 5000
rdr on $ext_if proto udp from !$localnet to $ext_if port 1026 -> $winbox port 135
rdr on $ext_if proto tcp from !$localnet to $ext_if port 1433 -> $winbox port 5000
rdr on $ext_if proto udp from !$localnet to $ext_if port 1433 -> $winbox port 135
rdr on $ext_if proto tcp from !$localnet to $ext_if port 2967 -> $winbox port 5000

anchor "ftp-proxy/*"
block in log all
pass out keep state

#pass from { lo0, $localnet } to any keep state

# honey outbound - not working yet so no point in scrubbing
#pass inet proto tcp from $localnet to any port $client_out flags S/SA keep state

pass quick on $int_if
antispoof quick for { lo $int_if }

pass in on $ext_if proto tcp to ($ext_if) port ssh keep state

# honey pot SYN proxy 3-way handshake
pass in log proto tcp from any to $winbox port $winports flags S/SA synproxy state
Back to top
dfeustel@mindspring.com
*nix forums addict


Joined: 13 May 2006
Posts: 67

PostPosted: Fri Jun 23, 2006 8:46 pm    Post subject: Re: using pf for honey pots Reply with quote

Gary <garyd@efn.org.spamsux> wrote:
Quote:
It's been a while since I've used pf extensively but I'm having trouble
sorting this one out. Is there a mailing list for pf users, btw?

There is a pf mailing list at openbsd.org.
--
Using OpenBSD with or without X & KDE?
http://dfeustel.home.mindspring.com
Back to top
jKILLSPAM.schipper@math.u
*nix forums Guru Wannabe


Joined: 13 Nov 2005
Posts: 202

PostPosted: Fri Jun 23, 2006 10:46 pm    Post subject: Re: using pf for honey pots Reply with quote

dfeustel@mindspring.com wrote:
Quote:
Gary <garyd@efn.org.spamsux> wrote:
It's been a while since I've used pf extensively but I'm having trouble
sorting this one out. Is there a mailing list for pf users, btw?

There is a pf mailing list at openbsd.org.

No, there is a general misc@openbsd.org mailing list which also does pf
questions. There is a more specific pf mailing list - see
<http://www.benzedrine.cx/mailinglist.html>.

Joachim
Back to top
jKILLSPAM.schipper@math.u
*nix forums Guru Wannabe


Joined: 13 Nov 2005
Posts: 202

PostPosted: Fri Jun 23, 2006 11:01 pm    Post subject: Re: using pf for honey pots Reply with quote

Gary <garyd@efn.org.spamsux> wrote:
Quote:
It's been a while since I've used pf extensively but I'm having trouble
sorting this one out. Is there a mailing list for pf users, btw? I'm
currently trying to get Tillman Werner's honeytrap[1] to compile but until
that's ready, I've come up with something else equally amusing.

net/honeyd comes to mind, as does spamd(Cool.

Quote:
In the mean time, I've taken an unpatched install of Windows XP Home SP1,
installed it under VMware, ...

You *do* know that VMWare might or might not actually succeed in
properly separating host and guest OS? See, for example, the list of
problems at <http://www.frsirt.com/english/vendor/3760>.

To be fair, this is something that is decidedly non-trivial, and VMWare
seems to do no worse a job than any of its (Open Source or not)
competitors. It's far from flawless, though, and a dedicated honey box
makes sense.

Quote:
... and am fwd'ing several ports to it. I was
having trouble singling out VM's IP to block its outbound traffic so my
temporary workaround was to run the Cisco VPN client which has a ZoneAlarm
engine packed with it. If I turn on the ZA firewall, traffic to/from the
guest OS works but traffic to the virtual is inbound only since ZA blocks
all outbound traffic from it. The end result is a lot of scans and failed
attempts by various bots, kiddies, and knuckleheads w/ no real results. No
spamming, either. A a recent rev nmap scan with will still show it's
fronted by a 3.X version of OpenBSD, however. I've also fwd'd a couple of
common exploits to other ports just to confuse them. Attached below is my
pf.conf.

Firewalling within the vulnerable host doesn't really help, as you know.
However, I have no clue how VMWare does networking, but I'll just
continue.

Quote:
My goal is to try to limit the virtual honey pot's outbound access to a
small handful of ports to prevent, among other things, spam, etc. But I
can seem to only block all traffic or none -- hence the ZA workaround in
the interim. Any feedback would be most welcome.

-Gary


ext_if="hme0"
int_if="xl0"
localnet = $int_if:network
# pot fulla honey!
winbox="172.16.75.30/32"
winports="{135,139,445,1025,5000}"
client_out= {ftp-data,ftp,ssh,domain,nntp,http,https}"

You are aware that ftp-data is handled quite well by ftp-proxy, and that
ssh brute force attacks are pretty much the most common attack seen by
*NIX admins nowadays, right?

Quote:
set skip on lo

scrub in

nat-anchor "ftp-proxy/*"
rdr-anchor "ftp-proxy/*"
nat on $ext_if from !($ext_if) -> ($ext_if:0)

rdr pass on $int_if proto tcp to port ftp -> 127.0.0.1 port 8021

# I smell honey -- do you?
rdr on $ext_if proto tcp from !$localnet to $ext_if port $winports -> $winbox
rdr on $ext_if proto udp from !$localnet to $ext_if port $winports -> $winbox
# fakeouts for Windows messaging, MS SQL, and NAV
rdr on $ext_if proto tcp from !$localnet to $ext_if port 1026 -> $winbox port 5000
rdr on $ext_if proto udp from !$localnet to $ext_if port 1026 -> $winbox port 135

These won't both work; you mean to set one to 1025, presumably.

Quote:
rdr on $ext_if proto tcp from !$localnet to $ext_if port 1433 -> $winbox port 5000
rdr on $ext_if proto udp from !$localnet to $ext_if port 1433 -> $winbox port 135
rdr on $ext_if proto tcp from !$localnet to $ext_if port 2967 -> $winbox port 5000

anchor "ftp-proxy/*"
block in log all
pass out keep state

#pass from { lo0, $localnet } to any keep state

# honey outbound - not working yet so no point in scrubbing
#pass inet proto tcp from $localnet to any port $client_out flags S/SA keep state

Am I correct in presuming that:
1. Without this rule, no traffic from the guest OS is allowed?
2. With this rule, *all* traffic from the guest OS is allowed?

In this case, I don't get it...

However, a good general troubleshooting tip: set all block rules to log,
and execute something like tcpdump -nvvvi pflog0; this will show you
exactly what doesn't work, at least.

Quote:
pass quick on $int_if
antispoof quick for { lo $int_if }

pass in on $ext_if proto tcp to ($ext_if) port ssh keep state

# honey pot SYN proxy 3-way handshake
pass in log proto tcp from any to $winbox port $winports flags S/SA synproxy state

synproxy state is likely to mess up port scanners even more; don't do it
if your goal is to lure skiddies.

Joachim
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Tue Dec 02, 2008 12:59 pm | All times are GMT
navigation Forum index » *nix » BSD » OpenBSD
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Hi there honey. It's Julie from the personals placefrom t... J devel 0 Fri May 20, 2005 5:00 am
No new posts Hey honey! :) Dalton devel 0 Tue Apr 19, 2005 11:50 am

Mortgages | Credit Card | Car salvage | Loans | Homeowner Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3310s ][ Queries: 13 (0.2295s) ][ GZIP on - Debug on ]