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

ekg.insecure.txt

ekg.insecure.txt
Posted Jul 7, 2005
Authored by Eric Romang

ekg versions 2005-06-05 and below suffer from a temporary file creation vulnerability that can lead to arbitrary code execution.

tags | advisory, arbitrary, code execution
advisories | CVE-2005-1916
SHA-256 | f3e3068a5e4291be5395ccfdd515de3b42a8eb9539016b6057bb6f8c1704c6ca

ekg.insecure.txt

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

ekg insecure temporary file creation and arbitrary code execution

Vendor: http://dev.null.pl/ekg/
Advisory: http://www.zataz.net/adviso/ekg-06062005.txt
Vendor informed: yes
Exploit available: no
Impact : high
Exploitation : high

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

The vulnerabilities are caused due to temporary file being created
insecurely.
This can be exploited via symlink attacks in combination to create and
overwrite
arbitrary files with the privileges of the user running the affected
script and
also arbitrary command possible by spiking the temporary file.

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

ekg <= 2005-06-05 22:03

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

For the symlink attack use kernel patch such as grsecurity

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

Discovered : 2005-05-27
Vendor notified : 2005-06-06
Vendor response : no response
Vendor fix : no fix
Vendor Sec report (vendor-sec@lst.de) : 2005-06-27
Disclosure : 2005-07-04

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

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

In contrib/scripts/linki.py

95 def czyjest ():
96 if os.path.exists('/tmp/rmrmg_ekg_url'):
97 wejsc= open ('/tmp/rmrmg_ekg_url')
98 file = wejsc.readlines()
99 dlug=len(file)
100 wejsc.close()
101 #ekg.printf("generic", "liczno¶æ %d" %(dlug))
102 return file
103 else:
104 return 0

Then

35 def handle_keypress(meta, key):
36 if key == 269:
37 ekg.printf("generic", "wci¶nieto F5")
38 nurl=czyjest()
39 if nurl == 0:
40 ekg.printf("generic", "nie ma zadnego adresu URL")
41 else:
42 dlug=len(nurl)
43 if dlug == 1:
44 ekg.printf("generic", "otwieram %s w nowej zak³adce"
%(nurl[0]))
45 os.system("MozillaFirebird -remote
'openURL(%s,new-tab)'" %(nurl[0]))
46 os.system('rm /tmp/rmrmg_ekg_url')
47 else:
48 ekg.printf("generic", "linków mam %d" %(dlug))
49 wielejest(nurl)
50 ekg.printf("generic", "otwieram %s w nowej zak³adce"
%(nurl[0]))
51 os.system("MozillaFirebird -remote 'openURL(%s,
new-tab)'" %(nurl[0]))
52 elif key == 270:
53 ekg.printf("generic", "wcisniêto F6")
54 nurl=czyjest()
55 if nurl == 0:
56 ekg.printf("generic", "nic nie moge skasowaæ - nie
mazadnego adresu URL")
57 else:
58 dlug=len(nurl)
59 if dlug == 1:
60 ekg.printf("generic", "kasuje adres %s" %(nurl[0]))

61 os.system('rm /tmp/rmrmg_ekg_url')
62 else:
63 ekg.printf("generic", "jest wiele linków")
64 wielejest(nurl)
65 ekg.printf("generic", "kasuje pierwszy czyli:
%s"%(nurl[0]))
66 elif key == 271:
67 ekg.printf("generic", "wcisniêto F7")
68 nurl=czyjest()
69 if nurl == 0:
70 ekg.printf("generic", "nie ma zadnego adresu URL")
71 else:
72 dlug=len(nurl)
73 if dlug == 1:
74 ekg.printf("generic", "otwieram %s w nowym
oknie"%(nurl[0]))
75 os.system("MozillaFirebird %s" %(nurl[0]))
76 os.system('rm /tmp/rmrmg_ekg_url')
77 else:
78 ekg.printf("generic", "linków mam %d" %(dlug))
79 wielejest(nurl)
80 ekg.printf("generic", "otwieram %s w nowym
oknie"%(nurl[0]))
81 elif key == 272:
82 ekg.printf("generic", "wcisniêto F8")
83 nurl=czyjest()
84 ekg.printf("generic", "F5 - otwiera w nowej zak³adce; F7
wnowym oknie, a F6 kasuje, wszystko tyczy siê pierwszej po zycji
zlisty")
85 if nurl == 0:
86 ekg.printf("generic", "nie ma zadnego adresu URL")
87 else:
88 dlug=len(nurl)
89 ekg.printf("generic", "linków mam %d oto one:" %(dlug))
90 for po in nurl:
91 ekg.printf("generic", "%s" %(po))
92 return 1

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

Gentoo Bugs report : http://bugs.gentoo.org/show_bug.cgi?id=94172
CVE : CAN-2005-1916

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

Eric Romang (eromang@zataz.net - ZATAZ Audit)
Thxs to Gentoo Security Team. (Taviso, jaervosz, solar, tigger, etc.)
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    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