Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 48 guests online
 
Advertisement

You are here: Home arrow Ethical Hacking Discussions and Related Certificationsarrow Programmingarrow Java Source Code Review
EH-Net
May 22, 2013, 03:17:27 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Go back to The Ethical Hacker Network Online Magazine Home Page
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Java Source Code Review  (Read 6107 times)
0 Members and 1 Guest are viewing this topic.
UNIX
Hero Member
*****
Offline Offline

Posts: 1235


View Profile
« on: August 24, 2010, 02:49:04 AM »

I have to do a Java source code review in the next time and wanted to ask if anyone has some experience with this and can give hints/ recommendations on what to look for etc.
Since I'll probably have to do most without the help of any static analysis tools, I'm looking for manual approaches.
Any help is much appreciated.

Logged
H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 864



View Profile
« Reply #1 on: August 24, 2010, 05:31:19 AM »

I will have to do the same thing next week!

That being said, can you give me more info about the code you will review?

I know Java very well as well as frameworks, architecture etc. But depending of the size of the application, this could be a very long task...

Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
H1t M0nk3y
Hero Member
*****
Offline Offline

Posts: 864



View Profile
« Reply #2 on: August 24, 2010, 08:18:38 AM »

Ok, here are a few resources:

OWASP Code Review Guide:
http://www.lulu.com/product/paperback/owasp-code-review/4458615

List of things to look for (while quite basic):
http://www.sans.org/security-training/secure-code-review-java-web-apps-1192-mid

OWASP Top 10 vulnerabilities (very good reading!!)
http://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project

It depends if you are reviewing a web application, an applet, a stand alone application, etc. But in my opinion, without spending a week writting on the subject, I would look for:


1) Input validation: Proper server-side validation of all inputs, including drop-down menus, and hidden fields

2) SQL queries: Check if the framework uses Object Relational Mapping (ORM) like Hibernate, prepared statements or stored procedures.

3) Database connections: How the database credentials are stored, database user having "least privileges", encrypted connection

4) AJAX and Web Services: Look at these two very well. Again, validate all inputs, fuzz them. Do you need to sign your web services?

5) Java frameworks for web applications like Spring MVC or MyFaces do a great job filtering bad characters for you. However, you should test different character encoding nevertheless.

6) Spend some time reviewing session management mechanism: login, logout, change password, etc.

7) Basically, review the OWASP Top 10 vulnerabilities and make sure there are none in your code.

8 ) Check they don't copy sensitive data from prod to dev, for example client's account, personal address, etc

9) Is the repository secure?

10) You can also check for proper separation of layers: Model-View-Controller, 3-Tier like Presentation-Service-data layers, Service Oriented Architecture, etc

11) If 2 systems trust each other, make sure they are who they say they are (look for possibnle MitM)

I have to go, but I will add more later.



Logged

OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
secureseven
Jr. Member
**
Offline Offline

Posts: 79



View Profile
« Reply #3 on: August 24, 2010, 10:06:43 AM »

Nice review H1t M0n3y. I have a similar task and that was an interesting read!
Logged

http://twitter.com/mikesantillana
eLearnSecurity Team Member.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.059 seconds with 23 queries.
 
Exclusive Deal

sansfire13_245x90_cw90.jpg
SANSFIRE 2013
June 15 - 22

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 
Recent Forum Topics
EH-Net News Feeds
Latest Additions
 
         
Advertisement

© 2013 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.