DOI QR코드

DOI QR Code

PDF 버전 1.4-1.6의 CUDA GPU 환경에서 암호 해독 최적 구현

PDF Version 1.4-1.6 Password Cracking in CUDA GPU Environment

  • 김현준 (한성대학교 정보컴퓨터공학과) ;
  • 엄시우 (한성대학교 IT융합공학부 ) ;
  • 서화정 (한성대학교 IT융합공학부)
  • 투고 : 2022.08.01
  • 심사 : 2022.10.22
  • 발행 : 2023.02.28

초록

매년 수십만 개의 암호를 분실하거나 잊어버리면서 합법적인 소유자나 권한을 부여받은 법 집행 담당자가 필요한 정보를 사용할 수 없게 된다. 이러한 암호를 되찾기 위해 암호 해독(Password Cracking)이 사용된다. 암호 해독에 CPU 대신 GPU를 사용하면 복구 과정에서 필요한 많은 양의 계산을 신속하게 처리할 수 있다. 본 논문은 현재 가장 많이 사용되는 PDF 1.4 -1.6 버전의 암호 해독에 중점을 두고 CUDA를 사용하여 GPU에서 최적화한다. MD5 알고리즘의 불필요 연산 제거, RC4 알고리즘의 32비트 워드 통합 구현, 공유메모리 사용의 기법을 사용하였다. 또한 성능향상에 영향을 미치는 블록, 스레드 수 탐색을 위해 오토튠 기법을 사용하였다. 결과적으로 RTX 3060, RTX 3090 환경에서 블록 크기 65,536, 스레드 크기 96에서 31,460 kp/s(kilo passwords per second), 66,351 kp/s의 처리량을 보였으며, 기존 최고 처리량을 보여주는 해시캣의 처리량보다 각각 22.5%, 15.2%를 향상시켰다.

Hundreds of thousands of passwords are lost or forgotten every year, making the necessary information unavailable to legitimate owners or authorized law enforcement personnel. In order to recover such a password, a tool for password cracking is required. Using GPUs instead of CPUs for password cracking can quickly process the large amount of computation required during the recovery process. This paper optimizes on GPUs using CUDA, with a focus on decryption of the currently most popular PDF 1.4-1.6 version. Techniques such as eliminating unnecessary operations of the MD5 algorithm, implementing 32-bit word integration of the RC4 algorithm, and using shared memory were used. In addition, autotune techniques were used to search for the number of blocks and threads that affect performance improvement. As a result, we showed throughput of 31,460 kp/s (kilo passwords per second) and 66,351 kp/s at block size 65,536, thread size 96 in RTX 3060, RTX 3090 environments, and improved throughput by 22.5% and 15.2%, respectively, compared to the cracking tool hashcat that achieves the highest throughput.

키워드

과제정보

이 논문은 2022년도 정부(과학기술정보통신부)의 재원으로 정보통신기획평가원의 지원을 받아 수행된 연구임 (No.2021-0-00540, GPU/ASIC 기반 암호알고리즘 고속화 설계 및 구현 기술개발, 80%) 그리고 이 성과는 2022년도 정부(과학기술정보통신부)의 재원으로 한국연구재단의 지원을 받아 수행된 연구임(No. NRF-2020R1F1A1048478, 20%).

참고문헌

  1. Du, Xiaoyu et al., "SoK: Exploring the state of the art and the future potential of artificial intelligence in digital forensic investigation," Proceedings of the 15th International Conference on Availability, Reliability and Security, No.46, pp.1-10, 2020.
  2. K. W. Kim and U. S. Kyong, "Efficient implementation of MD5 algorithm in password recovery of a PDF file," 2012 7th International Conference on Computing and Convergence Technology (ICCCT), IEEE, 2012.
  3. L. Bosnjak, J. Sres, and B. Brumen, "Brute-force and dictionary attack on hashed real-world passwords," 2018 41st International Convention on Information and Communication Technology, Electronics and Microelectronics (Mipro), pp.1161-1166, 2018.
  4. M. Hardy, L. Masinter, D. Markovic, D. Johnson, and M. Bailey, "The application/pdf Media Type," No.rfc8118, 2017.
  5. C. Ge, L. Xu, W. Qiu, Z. Huang, J. Guo, G. Liu, and Z. Gong, "Optimized password recovery for SHA-512 on GPUs," 2017 IEEE International Conference on Computational Science and Engineering(CSE) and IEEE International Conference on Embedded and Ubiquitous Computing(EUC), IEEE, Vol.2, pp.226-229, 2017.
  6. M. Durmuth and T. Kranz, "On password guessing with GPUs and FPGAs," International Conference on Passwords. Springer, Cham, Vol.9393, pp.19-38, 2014.
  7. R. Chen, Y. Zhang, J. Zhang, and J. Xu, "Design and optimizations of the MD5 crypt cracking algorithm based on CUDA," International Conference on Cloud Computing, Springer, Cham, pp.155-164, 2014.
  8. C. Li, H. Wu, S. Chen, X. Li, and D. Guo, "Efficient implementation for MD5-RC4 encryption using GPU with CUDA," 2009 3rd International Conference on Anti-counterfeiting, Security and Identification in Communication, IEEE, pp.167-170, 2009.
  9. K. W. Kim, S. S. Lee, D. W. Hong, and J. C. Ryou, "Gpuaccelerated password cracking of pdf files," KSII Transactions on Internet and Information Systems(TIIS), Vol.5, No.11, pp.2235-2253, 2011. https://doi.org/10.3837/tiis.2011.11.021
  10. Hashcat, hashcat: World's fastest and most advanced password recovery utility, 2022, [Internet], Available: https://github.com/hashcat/hashcat.
  11. B. D. Boer and A. Bosselaers. "Collisions for the compression function of MD5, Advances in Cryptology," Workshop on the Theory and Application of of Cryptographic Techniques, pp.293-304, 1993.
  12. L. R. Knudsen, W. Meier, B. Preneel, V. Rijmen, and S. Verdoolaege, "Analysis methods for (alleged) RC4," International Conference on the Theory and Application of Cryptology and Information Security, Springer, Berlin, Heidelberg, pp.327-341, 1998.
  13. S. Cook, "CUDA programming: A developer's guide to parallel computing with GPUs," Newnes, 2012.
  14. A. Khalid, G. Paul, and A. Chattopadhyay, "New speed records for Salsa20 stream cipher using an autotuning framework on GPUs," International Conference on Cryptology in Africa, Springer, Berlin, Heidelberg, pp.189-207, 2013.