시스템 프로그램 어택랩(attack lab) 과제 보고서
본 내용은
"
시스템 프로그램 어택랩(attack lab) 과제 보고서
"
의 원문 자료에서 일부 인용된 것입니다.
2023.05.31
문서 내 토픽
  • 1. Phase_1
    Phase_1에서는 getbuf 함수에 오버플로우가 일어날 값을 입력하고 touch1의 주소값을 입력하여 touch1이 실행되게 한다. asm.txt 파일을 확인하여 getbuf와 touch1의 어셈블리 코드를 찾아 필요한 값을 입력한다.
  • 2. Phase_2
    Phase_2에서는 touch2 함수를 실행하기 위해 rdi 레지스터에 cookie 값을 넣어주고 touch2 함수로 이동하는 코드를 삽입한다. 이를 위해 gdb를 실행하여 getbuf 직전의 rdi 값을 확인하고, buffer.s 파일을 작성하여 필요한 값을 입력한다.
  • 3. Phase_3
    Phase_3에서는 문자열을 입력받아 쿠키값과 비교하는 문제이다. 이를 위해 쿠키값을 아스키코드로 변환하고, getbuf 직전의 rdi 값을 구하여 문자열의 주소값을 넣어준다. 그리고 touch3의 주소값을 전달하여 touch3가 실행되게 한다.
  • 4. Phase_4
    Phase_4에서는 return-oriented programming을 이용해 문제를 해결해야 한다. asm2.txt 파일을 참고하여 필요한 gadget을 찾고, 이를 이용하여 rdi 레지스터에 cookie 값을 넣어주고 touch2 함수를 호출한다.
  • 5. Phase_5
    Phase_5에서는 add_xy 함수를 이용하여 문제를 해결한다. rsp 레지스터를 이용해 문자열의 주소를 rdi 레지스터에 담고, rsi에는 cookie 문자열을 넣어준다. 그리고 add_xy 함수를 호출하여 %rdi + %rsi => %rax를 수행하고, %rax를 %rdi에 저장한 뒤 touch3를 호출한다.
Easy AI와 토픽 톺아보기
  • 1. Phase_1
    Phase 1 is a critical stage in the development of any project or initiative. It lays the foundation for the entire process and sets the tone for what is to come. During this phase, it is essential to carefully define the goals, objectives, and scope of the project, as well as to identify any potential challenges or risks that may arise. This phase also involves gathering and analyzing relevant data, conducting feasibility studies, and developing a comprehensive plan of action. Effective planning and preparation during Phase 1 can greatly increase the chances of success in the later stages of the project. It is a time to carefully consider all aspects of the project and to ensure that the necessary resources, both human and financial, are in place to support the work ahead.
  • 2. Phase_2
    Phase 2 is a crucial stage in the development of any project or initiative, as it involves the implementation and execution of the plans and strategies established in Phase 1. During this phase, the project team must work diligently to bring the project to life, addressing any challenges or obstacles that may arise along the way. Effective communication, collaboration, and coordination among team members are essential, as is the ability to adapt and respond to changing circumstances. This phase also requires close monitoring and evaluation of progress, with regular check-ins and adjustments made as needed to ensure that the project remains on track and aligned with the original goals and objectives. Successful completion of Phase 2 lays the groundwork for the final stages of the project, where the fruits of the team's hard work can be realized and celebrated.
  • 3. Phase_3
    Phase 3 is a critical juncture in the development of any project or initiative, as it represents the culmination of the work done in the previous phases. During this phase, the project team must focus on finalizing the deliverables, ensuring that they meet the established quality standards and requirements. This may involve testing, validation, and refinement of the project outputs, as well as the implementation of any necessary changes or adjustments. Effective communication and collaboration with stakeholders, including clients or end-users, is essential during this phase, as it helps to ensure that the final product or service meets their needs and expectations. Additionally, this phase may involve the development of a comprehensive plan for the ongoing maintenance, support, and continuous improvement of the project's outputs. Successful completion of Phase 3 marks the transition to the final phase of the project, where the focus shifts to the long-term sustainability and impact of the work.
  • 4. Phase_4
    Phase 4 is the final and perhaps most critical stage in the development of any project or initiative. During this phase, the focus shifts from the immediate implementation and delivery of the project's outputs to the long-term sustainability and impact of the work. This may involve the development of a comprehensive plan for the ongoing maintenance, support, and continuous improvement of the project's deliverables, as well as the evaluation of the project's overall success and the identification of any lessons learned or areas for improvement. Effective communication and collaboration with stakeholders, including clients or end-users, is essential during this phase, as it helps to ensure that the project's outputs continue to meet their needs and expectations. Additionally, this phase may involve the development of a plan for the dissemination and scaling of the project's outputs, to ensure that the benefits of the work can be shared and replicated across a wider audience. Successful completion of Phase 4 marks the culmination of the project and the transition to the ongoing management and stewardship of the project's outputs.
  • 5. Phase_5
    Phase 5 is a critical and often overlooked stage in the development of any project or initiative. This phase focuses on the long-term sustainability and impact of the project's outputs, and involves the ongoing management, maintenance, and continuous improvement of the deliverables. During this phase, the project team must work closely with stakeholders, including clients or end-users, to ensure that the project's outputs continue to meet their needs and expectations. This may involve the implementation of regular feedback mechanisms, the development of a comprehensive plan for the ongoing support and maintenance of the project's outputs, and the identification of opportunities for further enhancement or expansion. Effective communication, collaboration, and knowledge-sharing are essential during this phase, as they help to ensure that the project's successes and lessons learned can be shared and applied to future initiatives. Successful completion of Phase 5 marks the true legacy of the project, as its outputs continue to have a positive and lasting impact on the communities or organizations it was designed to serve.