All of lore.kernel.org
 help / color / mirror / Atom feed
* security question
@ 2007-11-21  8:01 mabbas
  2007-11-21 15:17 ` wpa_supplicant/key deletion with all-zeroes mac (was: security question) Johannes Berg
  0 siblings, 1 reply; 20+ messages in thread
From: mabbas @ 2007-11-21  8:01 UTC (permalink / raw)
  To: linux-wireless; +Cc: Dan Williams, linville, Johannes Berg

Hi

When I connect to an AP with wpa, then I receive deauth frame, 
ieee80211_rx_mgmt_deauth will be called, which will call 
ieee80211_set_associated(dev, ifsta, 0); to disconnect. In function 
ieee80211_set_associated, it calls wireless_send_event with SIOCGIWAP 
event and memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN). wpa_supplicant will 
receives this event then call mac80211 to remove any old security key, 
the problem it will pass 00:00:00:00:00:00 as station address. 
ieee80211_set_encryption will fail since there are no station with 
00:00:00:00:00:00. This will leave the old key which causes the problems 
in the next reconnection.

Below is the work around to this problem, I am not very familiar with 
security in mac80211 so I appreciate any comment on how to fix this 
problem the right way.

Mohamed

diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index c84a26e..e08df5e 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -97,7 +97,10 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr,
 			return -EINVAL;
 		}
 
-		sta = sta_info_get(local, sta_addr);
+		if (is_zero_ether_addr(sta_addr))
+			sta = sta_info_get(local, sdata->u.sta.bssid);
+		else
+			sta = sta_info_get(local, sta_addr);
 		if (!sta) {
 #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
 			printk(KERN_DEBUG "%s: set_encrypt - unknown addr "

^ permalink raw reply related	[flat|nested] 20+ messages in thread
* Re: security question
@ 2004-06-03 15:06 Martín Chikilian
  2004-06-03 15:12 ` Antony Stone
  0 siblings, 1 reply; 20+ messages in thread
From: Martín Chikilian @ 2004-06-03 15:06 UTC (permalink / raw)
  To: netfilter

a.westendoerpf@gmx.de wrote:

> Hi *!

> I have the following setup. Please tell me if I have some security
> issues here.

> A linux box with two ethernet interfaces to work as a masquerading
> router. One of them (eth0) is connected to a dsl-modem, the other is a
> wlan card (eth1). All client systems get this box a default gateway
> via dhcp.

> My goal is to drop everything coming from the wlan by default. I do
> this with:

> # iptables -t nat -P PREROUTING  DROP

I don't know if i understand well what you wrote, but i think that your rule applies to drop packets being PREROUTED by default. What is the goal of this??
What you mean with "is to drop everything coming from the wlan by default" ??
You want to drop packets destined TO wlan by default???

> I want the all www-requests of the client systems to be redirected to
> the local Apache on the box. I do this with:

> # iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth1 - REDIRECT

The corect rule for this is the next one:
iptables -t nat -A POSTROUTING -p tcp --dport 80 -i eth1 -j REDIRECT

Note the POSTROUTING chain must be used (I think)

> As I need DNS for these www-requests I have to let DNS be accepted:

> # iptables -t nat -A PREROUTING -p udp --dport 53 -i eth1 -j ACCEPT

> Then, in the POSTROUTING chain I need all the packets that made it
> here to be masqueraded:

> # iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

> If I want to allow a specific wlan client to get outside connections I
> use:

> # iptables -t nat -I PREROUTING -m mac --mac-source XX:XX:XX:XX:XX:XX
> -i the1 -j ACCEPT

> to let him through.

> Beside of MAC-spoofing, is this setup safe? Can someone get though the
> PREROUTING chain, without being "MAC-inserted".

Sure there are ways to bypass this restriction, but it is pretty difficult, imho ;-)

> What can I do to block incoming connection attempts? I only want to
> allow ssh from outside (internet) to the box.
Through wlan?? You can do:
iptables --policy INPUT DROP	/* DROP by default incoming packets
iptables --append INPUT --in-interface eth1 --destination-port ssh --jump ACCEPT

Note that if you drop incoming packets by default, you also need to add a few rules:
iptables --append INPUT --in-interface eth1 --match multiport --ports http,https,ftp,ftp-data,ssh,... --jump ACCEPT
You must add the ports that you and your clients commonly use.

Any other doubt, contact the list.

Ciao, Martin



^ permalink raw reply	[flat|nested] 20+ messages in thread
* security question
@ 2004-06-02 12:58 Andreas Westendörpf
  0 siblings, 0 replies; 20+ messages in thread
From: Andreas Westendörpf @ 2004-06-02 12:58 UTC (permalink / raw)
  To: netfilter

Hi *!

I have the following setup. Please tell me if I have some security
issues here.

A linux box with two ethernet interfaces to work as a masquerading
router. One of them (eth0) is connected to a dsl-modem, the other is a
wlan card (eth1). All client systems get this box a default gateway
via dhcp.

My goal is to drop everything coming from the wlan by default. I do
this with:

# iptables -t nat -P PREROUTING  DROP

I want the all www-requests of the client systems to be redirected to
the local Apache on the box. I do this with:

# iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth1 - REDIRECT

As I need DNS for these www-requests I have to let DNS be accepted:

# iptables -t nat -A PREROUTING -p udp --dport 53 -i eth1 -j ACCEPT

Then, in the POSTROUTING chain I need all the packets that made it
here to be masqueraded:

# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

If I want to allow a specific wlan client to get outside connections I
use:

# iptables -t nat -I PREROUTING -m mac --mac-source XX:XX:XX:XX:XX:XX
-i the1 -j ACCEPT

to let him through.

Beside of MAC-spoofing, is this setup safe? Can someone get though the
PREROUTING chain, without being "MAC-inserted".

What can I do to block incoming connection attempts? I only want to
allow ssh from outside (internet) to the box.

Any help would be appreciated!

THX,
Andreas Westendörpf




^ permalink raw reply	[flat|nested] 20+ messages in thread
* RE: Security question
@ 2004-03-01 22:24 bmcdowell
  2004-03-01 22:47 ` John A. Sullivan III
  0 siblings, 1 reply; 20+ messages in thread
From: bmcdowell @ 2004-03-01 22:24 UTC (permalink / raw)
  To: netfilter


Anthony is correct.  Google it and you'll find numerous examples:

http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&q=forg
e+MAC+address+nic

Despite this fact, however, you don't seem to be using your imagination.
I've always preferred it when security people were just a little more
paranoid:

Imagine a scenario where some form of unknown attack is used to kill
your 'router' and turn one of your connected PC's into a 'router'
instead.

In that case, you would probably wish you had used scenario #2...  With
#2 a dead router means no internet, and that might actually be a good
thing - in an ostrich sort of way.


Bob

-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org]On Behalf Of Sasa Stupar
Sent: Monday, March 01, 2004 8:25 AM
To: Netfilter-List
Subject: Re: Security question


But with the MAC/IP filtering I can restrict access to the router. So 
anyone who is not in the MAC table for accept it will be refused.
I don't think that it is possible to forge MAC address of nic, or am I 
wrong?

Sasa


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re:Security question
@ 2004-03-01 13:41 Sasa Stupar
  2004-03-01 14:25 ` Security question Sasa Stupar
  0 siblings, 1 reply; 20+ messages in thread
From: Sasa Stupar @ 2004-03-01 13:41 UTC (permalink / raw)
  To: Netfilter-List

Thanx guys. Yes, I have a linux router. I have tested the solution one 
and looked at the console; there were a lot of "martians" on the nic's 
not intended for the source.
What about the external threat on the solution 1?
Internal users are unable to change anything since they don't have admin 
rights.

Sasa


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Security question
@ 2004-03-01 12:55 Sasa Stupar
  2004-03-01 13:03 ` Ray Leach
  2004-03-01 13:10 ` Antony Stone
  0 siblings, 2 replies; 20+ messages in thread
From: Sasa Stupar @ 2004-03-01 12:55 UTC (permalink / raw)
  To: Netfilter-List

What is the potential security problem if you have network as follows:

SOLUTION 1

INET-CABLE MODEM-----------------|
ROUTER-eth0-public IP address----|
ROUTER-eth1-private IP address---|------->SWITCH
ROUTER-eth2-private IP address---|
Internal server for mail,web-----|
all LAN users with private IP----|


SOLUTION 2

INET-CABLE MODEM-->eth0-ROUTER|--eth1|
			       --eth2|-->SWITCH
		 server and LAN users|

I am thinking of the solution 1 because cable modem is a little bit to 
far away from the router and I don't want to use to much of the cables. 
I have setup router with MAC address filtering and also put firewall on 
all internal computers.

What is possible security problem comparing the 2 solutions above?

Regards,
Sasa


^ permalink raw reply	[flat|nested] 20+ messages in thread
[parent not found: <3D207AD4.B1D7546E@gmx.net>]
* Security question
@ 2002-07-01 15:52 Oliver Ob
  0 siblings, 0 replies; 20+ messages in thread
From: Oliver Ob @ 2002-07-01 15:52 UTC (permalink / raw)
  To: Lx Suse E

Hi Linuxers...

I would like to learn more about "Linux and security".

What (useful links also appreciated) sources for reading
and mailinglists can you advise?

Thanks!
-- 
*º¤., ¸¸,.¤º*¨¨¨*¤        =Oliver@home=         *º¤., ¸¸,.¤º*¨¨*¤
I       http://www.bmw-roadster.de/Friends/Olli/olli.html       I
I       http://www.bmw-roadster.de/Friends/friends.html         I
I       http://groups.yahoo.com/group/VGAP-93                   I
I       mailto:VGAP-93-subscribe@yahoogroups.com                I
I       http://home.t-online.de/home/spacecraft.portal          I
>>>  Telek0ma iBBMS - now back online +49.4504.TRSi1/TRSi2   <<<
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Security question
@ 2002-04-11 12:23 Grigory Batalov
  2002-06-15 11:15 ` Bart Oldeman
  0 siblings, 1 reply; 20+ messages in thread
From: Grigory Batalov @ 2002-04-11 12:23 UTC (permalink / raw)
  To: linux-msdos

 What is more safe:

1) to start dosemu as 'sudo dosemu' or 'su -c dosemu'
   or
2) make suid-root copy of dosemu.bin and grant permisions
   in /etc/dosemu.users to execute it ??

--
 Grigory Batalov.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2007-11-24 20:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-21  8:01 security question mabbas
2007-11-21 15:17 ` wpa_supplicant/key deletion with all-zeroes mac (was: security question) Johannes Berg
2007-11-22  4:37   ` Jouni Malinen
2007-11-22  5:30     ` wpa_supplicant/key deletion with all-zeroes mac mabbas
2007-11-22 12:55     ` wpa_supplicant/key deletion with all-zeroes mac (was: security question) Johannes Berg
2007-11-24 20:00       ` Jouni Malinen
  -- strict thread matches above, loose matches on Subject: below --
2004-06-03 15:06 security question Martín Chikilian
2004-06-03 15:12 ` Antony Stone
2004-06-02 12:58 Andreas Westendörpf
2004-03-01 22:24 Security question bmcdowell
2004-03-01 22:47 ` John A. Sullivan III
2004-03-01 13:41 question Sasa Stupar
2004-03-01 14:25 ` Security question Sasa Stupar
2004-03-01 15:08   ` Antony Stone
2004-03-01 12:55 Sasa Stupar
2004-03-01 13:03 ` Ray Leach
2004-03-01 13:10 ` Antony Stone
     [not found] <3D207AD4.B1D7546E@gmx.net>
2002-07-01 18:47 ` Gavin Laking
2002-07-01 15:52 Oliver Ob
2002-04-11 12:23 Grigory Batalov
2002-06-15 11:15 ` Bart Oldeman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.