반응형 전체 글213 Basic password cracking (MD5, SHA1, ..) 기본적인 password cracking과 같은 문제를 CTF에서는 종종 접할 수 있다. 과거에도 비슷한 코드를 작성했었지만 메모리 초과로 인해서 포기하곤 했는데 우연히 검색을 하다가 알게된 부분이 있어서 공유해보고자 한다. 기본적으로 - MD5 : 32-bit hex digits - SHA1 : 40-bit hex digits - SHA256 : 256-bit hex digits 우선, 일부 문자열은 제공되어 있고 숫자만 padding하여 해쉬 값을 계산하는 것은 아래와 같다. 예제에서 주어진 것 처럼 실제 0000부터 9999까지 숫자만 붙여서 주어진 hash 값을 비교하는 것이므로 해당 예제는 상당히 간단하다. import hashlib prefix = "CTF-TEST-" match = "bf9e.. 2020. 7. 2. How to get a dict key in the list Example: interfaceList = [{"Gi 0/1" : "Switch 1"}, {"Gi 0/2" : "Switch 2"}] I want to get soley a str-type key from the list to look up a list of dict, which are Gi 0/1 and Gi 0/2. But, if I iterate and print the interfaceList and using keys() functions for elem in interfaceList: print(elem.keys()) I get a dict_keys-type key instead like the right below output. [Output] dict_keys(['Gi 0/1']) dic.. 2020. 6. 13. [CLI Script] VTP domain gathering pexpect module This script gathers vtp domain and vtp operation mode and then makes a spread sheet as a report. 2020. 6. 2. Dynamic Trunking Protocol (DTP) Dynamic Trunking Protocol (DTP)는 시스코 전용 프로토콜로 두 스위치 간 trunking mode를 협상하는데 사용된다. Interface는 trunking, nontrunking, 그리고 negotiate trunking 형태로 설정할 수 있다. 마지막 negotiate trunking 방식이 DTP에 의해서 처리된다. 우선, switchport mode의 option으로는 아래와 같이 크게 3가지가 존재하는데 access: interface를 항상 지정된 VLAN만 사용 dynamic: access/trunk 여부를 DTP를 이용하여 결정 trunk: interface를 항상 trunking port로 사용 S1과 S2는 항상 trunk mode 상태를 유지한다. 반대로 S1과.. 2020. 4. 17. 이전 1 ··· 39 40 41 42 43 44 45 ··· 54 다음 반응형