Tag: technology
Questions Related to technology
Give the reason(s) of Information leakage in the below code: 1 ... 2 3 4 Please enter your Login ID and Password to get into the Web Site. 5 6 Enter Login ID : 7 Enter Password : 8 9 10 11 12 ...
Which attack(s) are possible in the below code: protected void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException { String name = req.getParameter("name"); ... out.println("hello " + name.trim()); }
Which attack(s) are possible in the below code:
Identify the name of the vulnerability exist in the below code: 1 ... 2 public class ShowUserDetailsAction extends HttpServlet 3 { 4 private String currentUser; 5 public void doPost(HttpServletRequest req, HttpServletResponse res) 6 { 7 try 8 { 9 currentUser = req.getParameter("userID"); 10 RequestDispatcher rd = getServletContext().getRequestDispatcher ("/ShowDetails.jsp"); 11 if (!"".equals(currentUser)) 12 { 13 14 ArrayList userInfo = new ArrayList(); 15 LoginDAO objLoginDAO = new LoginDAO(); 16 userInfo = objLoginDAO.getUserInfo(currentUser); 17 18 if (userInfo!=null && (userInfo.size()!= 0)) 19 { 20 req.setAttribute("UserInfo", userInfo); 21 } 22 else 23 { 24 req.setAttribute("NoUser", "true"); 25 } 26 } 27 rd.forward(req,res); 28 } catch (Exception e) 29 { 30 log.debug(“Error Occurred:”+ e); 31 } 32 } 33 } 34 ...
Identify the weakness in the below JSP file: 1 ... 2 3 4 8 9 11 12 13 14 function doBack() 15 { 16 history.go(-1); 17 } 18 function doDelete() 19 { 20 document.forms[0].action="/DeleteUsersAction"; 21 document.forms[0].submit(); 22 } 23 24 ...
Identify the weakness in the below JSP file: 1 2 ... 3 Dear User, 4 5 If you liked our services, then you would like to refer it to your friends. 6 7 Click on the below link: 8 9 ";> "Refer a Friend"! 10 ... 11
Identify the Vulnerable Line # in the below code: 1 ... 2 public static Connection getConnection() 3 { 4 Connection con = null; 5 try 6 { 7 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); 8 con = DriverManager.getConnection("jdbc:odbc:Lookup","admin","admin"); 9 10 }catch (ClassNotFoundException e) 11 { 12 if(con!=null) 13 close(con); 14 log.debug(“Error Occurred:” + e); 15 16 } catch(SQLException ex) 17 { 18 19 if(con!=null) 20 close(con); 21 log.debug(“Error Occurred:” + ex); 22 } 23 return con; 24 } 25 ...