what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

giptables-05222005.txt

giptables-05222005.txt
Posted Jun 18, 2005
Authored by Eric Romang | Site zataz.net

GIPTables Firewall versions 1.1 and below suffer from an insecure file creation vulnerability that allows for symlink attacks.

tags | advisory
SHA-256 | 916ac1b2eb458387fa4004ef64b4ae9968c40a51fdd18dd87f5c944c4e66394a

giptables-05222005.txt

Change Mirror Download
#########################################################

GIPTables Firewall insecure temporary file creation

Vendor: http://www.giptables.org/
Advisory: http://www.zataz.net/adviso/giptables-05222005.txt
Vendor informed: yes
Exploit available: yes
Impact : medium
Exploitation : low

#########################################################

The vulnerability is caused due to temporary file being created
insecurely. This can be exploited via symlink attacks in combination
with a race condition to create and overwrite arbitrary files with the
privileges of the user running the affected script.

It is also possible to cause a Denial of Service by manipulating the
ip adresses present into the temporary file

The exploitation require that the root configure or reconfigure his
firewall rules.

##########
Versions:
##########

GIPTables Firewall <= v1.1

##########
Solution:
##########

non solution yet.

#########
Timeline:
#########

Discovered : 2005-05-22
Vendor notified : 2005-05-22
Vendor response : no response
Vendor fix : no fix
Disclosure : 2005-06-06

#####################
Technical details :
#####################

Vulnerable code :
- - -----------------

# Network Ghouls

[ "$NETWORK_GHOULS" == "yes" ] && \
[ "$DEBUG" = "on" ] && echo -e "\n# Network Ghouls"

if [ "$NETWORK_GHOULS" == "yes" ] && [ -f
"$GIPTABLES_BLOCKED_FILE" ]; then

deny_file="$GIPTABLES_BLOCKED_FILE"
temp_file="/tmp/temp.ip.addresses"
cat $deny_file | sed -n -e "s/^[ ]*\([0-9.]*\).*$/\1/p" | awk '
$1 ' > $temp_file
while read ip_addr
do

drop_ipaddr interface0_in source $ip_addr && \
drop_ipaddr interface0_out destination $ip_addr

[ -n "$INTERFACE1" ] && \
drop_ipaddr interface1_in source $ip_addr && \
drop_ipaddr interface1_out destination $ip_addr

[ -n "$INTERFACE1" ] && \
drop_ipaddr network1_in source $ip_addr && \
drop_ipaddr network1_out destination $ip_addr

done < $temp_file
rm -f $temp_file > /dev/null 2>&1
unset temp_file
unset deny_file

fi

#########
Related :
#########

nothing related

##############
Possible fix :
##############

deny_file="$GIPTABLES_BLOCKED_FILE"

if mkdir "/tmp/.giptables.$$"; then
chmod 700 /tmp/.giptables.$$
temp_file="/tmp/.giptables.$$/temp.ip.addresses"
else
echo "$Error: failed to create temporary file" 1>&2
exit 1
fi
temp_file="/tmp/.giptables.$$/temp.ip.addresses"


#####################
Credits :
#####################

Eric Romang (eromang@zataz.net - ZATAZ Audit)
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close