home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / E-zine / Magazines / set / eng-1199.txt next >
Encoding:
Text File  |  2002-05-27  |  6.9 KB  |  205 lines

  1.  
  2.  
  3. SET <set-fw@bigfoot.com>    
  4. November 1999        http://www.imedia.es/set/us/eng-1199.txt
  5.  
  6.  
  7. ---[ CONTENTS ]--- 
  8.  
  9. - 01 -     Introduction
  10. - 02 -     Problems found
  11. - 03 -     Q&A
  12. - 04 -     Conclusions
  13.  
  14.  
  15.  
  16.  
  17. - 01 ----------------------   Introduction   ------------------------
  18.  
  19. Several members of SET have discovered key flaws in the security of 
  20. ciudad.com.ar, the incorrect configuration of EdgeMail system, used to
  21. offer mail services trough web, appears to be the cause. 
  22. Ciudad.com.ar is an Argentinian portal offering free webmail accounts as
  23. well as chat and ICQ-style messaging, over 150.000 accounts could have been
  24. compromised.
  25.  
  26.  
  27.  
  28.  
  29. - 02 ----------------------   Problems found   ----------------------
  30.  
  31. After finding the host responsible for running the service and storing the
  32. data we learn that anyone could:
  33.  
  34. #1   Read any mail
  35. #2   Hijack accounts
  36. #3   Access the password file
  37. #4   Get POP accounts settings
  38. #5   Determine active users
  39.  
  40.  
  41.  
  42. [#1]  Read any mail
  43.  
  44. By going to a concrete URL it's possible to read any mail stored in the 
  45. server without performing any kind of authentication. We'll learn by example:
  46.  
  47.   http://vulnerablesitein.ciudad.com.ar/edgemail/folders/
  48.  
  49. Will list directory entries for characters [0-9,a-z], every user's mail is
  50. placed in the directory which matches their first username's character
  51. So imagine we'd like to see the mail from user "nosuchuser", we'll go to:
  52.  
  53.   http://vulnerablesitein.ciudad.com.ar/edgemail/folders/n/
  54.  
  55. And scroll down until we find entries like:
  56.  
  57.  ./n/nosuchuser.InBox  4k
  58.  ./n/nosuchuser.Sent   3k
  59.  
  60. Clicking on the link will bring us the usual unix-style plain text file with
  61. all the mail for that folder.
  62.  
  63.  
  64.  
  65. [#2]  Hijack accounts
  66.  
  67. While the first problem 'only' let the attacker to read the mail we found that
  68. it's possible to "take over" any existing account, ciudad.com.ar has a 3-step
  69. process to create a new account, the first step checks for the username desired
  70. and returns an error if already exists, the bug lies in the fact that the 
  71. actual Perl script called to create the account DOES NOT check if that username
  72. exist, remember step 1 should have take care of it, so if we go to an URL like:
  73.  
  74.  
  75.   http://vulnerablesitein.ciudad.com.ar/cgi-bin/creawebmail.pl?user=testuser&
  76.          pass=anypassword&srvid=1
  77.   [Line wrapped for clarity]
  78.  
  79. We'll have created a new account bypassing the checks (and the personal info
  80. screens :-) )
  81.  
  82. We can hijack the webmail of nosuchuser@ciudad.com.ar by giving her username
  83. in the user field, note that all folders are _deleted_ when you proceed this
  84. way.
  85.  
  86.  
  87.  
  88. [#3]  Access the password file
  89.  
  90. Over 150.000 passwords were left open for anyone to see, the problem is bigger
  91. if you consider that:
  92.  
  93. - Most of these passwords are also used in services like ciudad.com.ar's chat 
  94. or instant messaging.
  95. - Prima, the owner or ciudad.com.ar, is a national ISP in Argentina, many users
  96. will no doubt have the same password for dial-up, POP and web-mail accounts,
  97. FTP access and so on...
  98.  
  99. Once determined that the EdgeMail installation was exploitable it is s simple
  100. as:
  101.  
  102.   http://vulnerablesitein.ciudad.com.ar/edgemail/auth/users
  103.  
  104. This could have permited potential intruders obtaining free, unlimited access 
  105. to unsuspecting users accounts, deleting individual pieces of e-mail, forging
  106. messages..etc.
  107.  
  108.  
  109.  
  110. [#4]  Get POP accounts settings
  111.  
  112. It's nice to check the POP account from the browser, and it's nice to integrate
  113. mail from different accounts into one centralized place, but it isn't nice if 
  114. you are exposed to have all you accounts compromised at once. As many systems
  115. do EdgeMail allows to check remote accounts and offers the chance of saving
  116. the settings for future sessions, these settings include POP server, POP 
  117. username and POP password. EdgeMail saves this info in a database file under
  118. the /data subdirectory, let's go to:
  119.  
  120.   http://vulnerablesitein.ciudad.com.ar/edgemail/data/pops
  121.  
  122. It's a safe bet to assume that many of these passwords are the same passwords 
  123. used for dial-up access and FTP access opening up new accounts in many 
  124. differents ISPs.
  125.  
  126.  
  127.  
  128. [#5]  Determine active users
  129.  
  130. Ever wonder if nosuchuser@ciudad.com.ar is online now?. What IP is her using?.
  131. But you know she didn't wanna tell you so...what can we do?. I think you'd 
  132. like the EdgeMail active users feature :-). Just type in your browser:
  133.  
  134.   http://vulnerablesitein.ciudad.com.ar/edgemail/active/
  135.  
  136. It will show up a listing of all the users currently logged with their IP.
  137. An _example_:
  138.  
  139.  
  140.      adxxx@200.41.229.xxx:+  15-Jan-99 22:32     0K  
  141.      adrxx@200.43.37.xxx:00+ 15-Jan-99 22:14     0K  
  142.      adrixx_xxxxx@200.16.1+  15-Jan-99 21:45     0K  
  143.      adrixxxxxx@200.42.16.+  15-Jan-99 22:31     0K  
  144.      adrixxxxxxx@24.232.9.+  15-Jan-99 22:11     0K  
  145.      adriaxxxxxxx@168.96.1+  15-Jan-99 22:55     0K  
  146.      ......................  ...............     .. 
  147.      ......................  ...............     .. 
  148.  
  149.  
  150.  
  151.  
  152. - 03 -----------------   Q&A: Questions and Answers. ----------------
  153.  
  154.  
  155. 0x01?  I'm a user from ciudad.com.ar, what should I do?
  156.  
  157. Change your password INMEDIATELY, change all the passwords that could have
  158. been compromised, don't forget to check you're not using the same password to
  159. access other services.
  160. Don't worry about your mail, I know it sounds strange, but the admin of ciudad
  161. has already been informed and he would have corrected all the issues by the
  162. time you read this.
  163.  
  164. 0x02? I'm using EdgeMail in my site, am I at risk?
  165.  
  166. Sorry we can't tell you, our best bet is that this a specific problem of
  167. ciudad.com.ar configuration and not related to EdgeMail. Try the examples 
  168. URLs given above, if they work in your site then you are at risk too!
  169.  
  170. 0x03?  I'm using (you name it) web mail account, is it secure?.
  171.  
  172. No system is secure, bugs come and go, you SHOULDN'T use webmail systems to
  173. store or send sensitive information such as financial records, VISA numbers,
  174. passwords..etc. Sadly most people don't know, don't care and one day they
  175. might find out they have learned the hard way.
  176. We repeat, DON'T USE webmail systems (HotMail, YahooMail..etc) to store
  177. anything you don't like anyone to see. 
  178. You also should start considering *encrypting* your messages.
  179.  
  180.  
  181.  
  182.  
  183. - 04 --------------------   Conclusions   ---------------------------
  184.  
  185.  
  186. Keep calm, if you have an account in ciudad.com.ar you should know that 
  187. it's probably safer than ever :->. Pay attention to the advices given
  188. above, use encryption (don't store the keys in the server!!), try to keep
  189. up to date with security news and relax...la vita e bella.
  190.  
  191.  
  192. Links:
  193.  
  194. http://www.ciudad.com.ar                 -- Ciudad main site
  195. http://www.set-ezine.org            -- SET
  196. http://www.edgemail.com                 -- Edgemail
  197. http://packetstorm.securify.com/mag/set  -- Copies of SET Ezine (spanish only!) 
  198.  
  199. Spanish (espanol) version                 http://www.imedia.es/set/web/set-1199.txt 
  200.  
  201.  
  202. Feel free to copy and distribute.
  203.  
  204. SET (c) 1999 .
  205.