exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

coolservlets.txt

coolservlets.txt
Posted Feb 26, 2005
Authored by Josh884

The open source guestbook script from CoolServlets.com is susceptible to input validation and logic flaws.

tags | advisory
SHA-256 | 2387b8d6ae974bbd8dd50740fa50a397babe8edbc825c771b0eb5c8cb5ac9d18

coolservlets.txt

Change Mirror Download


Audit of the script: http://www.coolservlets.com/CSGuestbook/
About this script: This is an open source GuestBook script offered by CoolServlets.com
About the audit: This audit was performed by Daxgrapol and Dopel for RACAT (a subgroup of CASOS in the cyberarmy.net community).

Note in advance: The script is dated at Feb 10, 2000, suggesting it is about 5 years old.

Exploits found:

File name: CSGuesbook.java
Method name: public void service()
Vulnerability Description: Although there is only one user mode currently implemented,
the client could potentially send any user mode it wanted including "admin"
which currently is not authenticated.

File name: GuesbookFilter.java
Method name: public String filterBadwords()
Vulnerability Description: Only the first special character is filtered off of the return string.
This can lead to string being return with escape characters concatenated
on the user input.

Ex. "Hello\\"
(found by: Dopel).

- Buffer overflow is possible (input field length not checked).
(found by: Daxgrapol).

Some logical coding errors:
- the resulting hyperlink in the URL field (website of the signer) is something like this:
http://localhost:8080/guestbook/www.sitename.com
(where localhost:8080/guestbook refers to my local configuration)
The error is in GuestBookEntry.java, line 59:
return "<a href=\"" + url + "\">" + url + "</a>";
must be :
return "<a href=\"http://" + url + "\">" + url + "</a>";
This because the transmission protocol is not specified.

- In the method addDatabaseEntry(req, res, db) the input fields presence are validate like this:
String entry_name = request.getParameter("name");
if (entry_name == null) entry_name = "";
Better solution is:
String entry_name = "";
entry_name = request.getParameter("name").trim();
(This in order to avoid a 'valid' entry like ' x').

- There is not a check on the maxlenght of each input field. Wherever I can put the entire 'Divine Commedy'. This check is imperative in the servlet code, suggested in the html form.

- The email address is not checked as a real one (like the web address). Not really important in a guestbook, but if I ask for them why not to check them?
(found by: Daxgrapol).

Conclusion:
This project is actually outdated by so much that we hope no-one uses it anymore, if you still do, you should really consider updating to something more safe, and coded to more recent standards.
Still this report should show you how important proper coding is.

On behalf of RACAT and CASOS,
Anvar

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
    0 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