본문 바로가기
728x90
반응형

개발보안28

보안약점 진단 #3 01 private static final boolean PRIVATE_STATIC_FINAL_TRUE = true; 02 private static final boolean PRIVATE_STATIC_FINAL_FALSE = false; 03 04 public void do(String password) throws Throwable { 05 if (password == null) { 06 return; 07 } 08 if (PRIVATE_STATIC_FINAL_TRUE) { 09 MessageDigest hash = MessageDigest.getInstance("SHA-512"); 10 byte[] hashValue = hash.digest(password.getBytes("UTF-8")); 11 .. 2020. 7. 12.
보안약점 진단 #2 01 public void do(HttpServletRequest request, HttpServletResponse response) throws Throwable { 02 String data = ""; 03 { 04 Connection connection = null; 05 PreparedStatement preparedStatement = null; 06 ResultSet resultSet = null; 07 try { 08 connection = IO.getDBConnection(); 09 preparedStatement = connection.prepareStatement("select name from users where id=0"); 10 resultSet = preparedStateme.. 2020. 7. 12.
보안약점 진단 #1 01 public void do() throws Throwable { 02 String data = ""; 03 { 04 Socket socket = null; 05 BufferedReader readerBuffered = null; 06 InputStreamReader readerInputStream = null; 07 try { 08 socket = new Socket("host.example.org", 39544); 09 readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8"); 10 readerBuffered = new BufferedReader(readerInputStream); 11 data = readerBuffe.. 2020. 7. 12.
요약정리 1 제시한 보안대책에 해당하는 보안약점은? (1) SQL 삽입 (2) 경로조작 및 자원삽입 (3) 크로스사이트 스크립트 (4) 위험한 형식 파일 업로드 (5) 크로스사이트 요청 위조 (6) HTTP 응답 분할 (7) 적절하지 않은 난수 값 사용 (8) 충분하지 않은 키 길이 사용 2019. 11. 8.
728x90
반응형