The document discusses C++ exploitation techniques including name mangling, virtual function tables, vtable hijacking, vectors, strings, and memory allocation/deallocation functions like new and delete. It provides details on how virtual function tables are used to implement polymorphism in C++ and how vtable hijacking can be used to exploit vulnerabilities by forcing a vtable and hijacking the virtual function pointer to call shellcode. It also explains how vectors and strings are implemented dynamically in memory and their memory layout.
This document summarizes a presentation about attacking the DirectComposition component of the Windows graphics subsystem. It discusses:
1) An overview of DirectComposition and its architecture.
2) Two zero-day vulnerabilities the researchers found - a double free bug and integer overflow bug that were exploited to achieve code execution.
3) Their fuzzing approach and how they increased coverage of important DirectComposition functions.
4) Mitigation techniques Microsoft employed in later versions and ways the researchers bypassed them, such as abusing tagWND and bitmap objects.
- MySQL injection techniques can be used to extract data through blind injection, union queries, and error-based injection. Time-based blind injection and deep blind injection can extract data character by character.
- Load_file and into outfile functions can be used to read and write files in MySQL. Information from information_schema, user-defined functions, and triggers may also be exploitable.
- Triggers are database objects that activate when events like insert, update or delete occur and may potentially be exploited to add new accounts or stop the MySQL server.
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...CODE BLUE
Printer has become one of the essential devices in the corporate intranet for the past few years, and its functionalities have also increased significantly. Not only print or fax, cloud printing services like AirPrint are also being supported as well to make it easier to use. Direct printing from mobile devices is now a basic requirement in the IoT era. We also use it to print some internal business documents of the company, which makes it even more important to keep the printer safe.
Nowadays, most of the printers on the market do not have to be connected with USB or traditional cable. As long as you are using a LAN cable connected to the intranet, the computer can find and use the printer immediately. Most of them are based on protocols such as SLP and LLMNR. But is it really safe when vendors adopt those protocols? Furthermore, many printers do not use traditional Linux systems, but use RTOS(Real-Time Operating System) instead, how will this affect the attacker?
In this talk, we will use Canon ImageCLASS MF644Cdw and HP Color LaserJet Pro MFP M283fdw as case study, showing how to analyze and gain control access to the printer. We will also demonstrate how to use the vulnerabilities to achieve RCE in RTOS in unauthenticated situations.
2019/11/23 JJUG CCC 2019 Fall
「多言語対応の仮想マシンGraalVMが照らす未来」のセッションスライドです。
---
オラクル社からGraalVMというOSSプロダクトが発表され、話題を呼んでいます。GraalVMは、Javaで書かれたJITコンパイラ、Graalを搭載しています。さらに、言語実装用のフレームワークTruffleを提供しており、そのフレームワークを使って実装したJavaScriptやRuby、Pythonなど他の言語を、GraalVMは高いパフォーマンス実行できます。GraalVMを多言語対応の仮想マシンと呼ぶ理由です。加えて、それらすべての言語間で、相互に呼び出しができます。また、ネイティブイメージを作成し、JVMを利用せずにアプリケーションを実行できます。MicronautやQuarkus、Helidonといった最新のフレームワークが、この機能を利用して起動時間の短縮を図っています。ともすれば、GraalVMとは、ネイティブイメージを作成するためのものである、というイメージを持たれている方もいるかもしれません。しかし、GraalVMが持つパワーは、それだけではありません。このセッションでは、上述のGraalVMの概要の説明やデモに加え、単にGraalVMの使い方に留まらず、GraalVMによって今後何が実現されるのか、世界でのGraalVMの活用事例、Java on iOSとの関連、といったことお話しします。
The document discusses C++ exploitation techniques including name mangling, virtual function tables, vtable hijacking, vectors, strings, and memory allocation/deallocation functions like new and delete. It provides details on how virtual function tables are used to implement polymorphism in C++ and how vtable hijacking can be used to exploit vulnerabilities by forcing a vtable and hijacking the virtual function pointer to call shellcode. It also explains how vectors and strings are implemented dynamically in memory and their memory layout.
This document summarizes a presentation about attacking the DirectComposition component of the Windows graphics subsystem. It discusses:
1) An overview of DirectComposition and its architecture.
2) Two zero-day vulnerabilities the researchers found - a double free bug and integer overflow bug that were exploited to achieve code execution.
3) Their fuzzing approach and how they increased coverage of important DirectComposition functions.
4) Mitigation techniques Microsoft employed in later versions and ways the researchers bypassed them, such as abusing tagWND and bitmap objects.
- MySQL injection techniques can be used to extract data through blind injection, union queries, and error-based injection. Time-based blind injection and deep blind injection can extract data character by character.
- Load_file and into outfile functions can be used to read and write files in MySQL. Information from information_schema, user-defined functions, and triggers may also be exploitable.
- Triggers are database objects that activate when events like insert, update or delete occur and may potentially be exploited to add new accounts or stop the MySQL server.
[cb22] Your Printer is not your Printer ! - Hacking Printers at Pwn2Own by A...CODE BLUE
Printer has become one of the essential devices in the corporate intranet for the past few years, and its functionalities have also increased significantly. Not only print or fax, cloud printing services like AirPrint are also being supported as well to make it easier to use. Direct printing from mobile devices is now a basic requirement in the IoT era. We also use it to print some internal business documents of the company, which makes it even more important to keep the printer safe.
Nowadays, most of the printers on the market do not have to be connected with USB or traditional cable. As long as you are using a LAN cable connected to the intranet, the computer can find and use the printer immediately. Most of them are based on protocols such as SLP and LLMNR. But is it really safe when vendors adopt those protocols? Furthermore, many printers do not use traditional Linux systems, but use RTOS(Real-Time Operating System) instead, how will this affect the attacker?
In this talk, we will use Canon ImageCLASS MF644Cdw and HP Color LaserJet Pro MFP M283fdw as case study, showing how to analyze and gain control access to the printer. We will also demonstrate how to use the vulnerabilities to achieve RCE in RTOS in unauthenticated situations.
2019/11/23 JJUG CCC 2019 Fall
「多言語対応の仮想マシンGraalVMが照らす未来」のセッションスライドです。
---
オラクル社からGraalVMというOSSプロダクトが発表され、話題を呼んでいます。GraalVMは、Javaで書かれたJITコンパイラ、Graalを搭載しています。さらに、言語実装用のフレームワークTruffleを提供しており、そのフレームワークを使って実装したJavaScriptやRuby、Pythonなど他の言語を、GraalVMは高いパフォーマンス実行できます。GraalVMを多言語対応の仮想マシンと呼ぶ理由です。加えて、それらすべての言語間で、相互に呼び出しができます。また、ネイティブイメージを作成し、JVMを利用せずにアプリケーションを実行できます。MicronautやQuarkus、Helidonといった最新のフレームワークが、この機能を利用して起動時間の短縮を図っています。ともすれば、GraalVMとは、ネイティブイメージを作成するためのものである、というイメージを持たれている方もいるかもしれません。しかし、GraalVMが持つパワーは、それだけではありません。このセッションでは、上述のGraalVMの概要の説明やデモに加え、単にGraalVMの使い方に留まらず、GraalVMによって今後何が実現されるのか、世界でのGraalVMの活用事例、Java on iOSとの関連、といったことお話しします。
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesPeter Hlavaty
The document discusses exploiting TrueType font (TTF) vulnerabilities to achieve kernel code execution on Windows systems. It begins by describing the discovery of exploitable bugs in a TTF fuzzer. Despite mitigations like KASLR, NX, SMAP, and CFG, the researchers were able to bypass these protections through techniques like controlled overflows, abusing plain kernel structures, and function-driven attacks. They show how to leverage wild overflows, control kernel memory layout, and hijack control flow to achieve arbitrary code execution. The document emphasizes that OS design weaknesses allow bypassing modern defenses through clever bug chaining and memory manipulation.
The document discusses analyzing crashes using WinDbg. It provides tips on reconstructing crashed call stacks and investigating what thread or lock is causing a hang. The debugging commands discussed include !analyze, !locks, .cxr, kb to find the crashing function and stuck thread.
You didnt see it’s coming? "Dawn of hardened Windows Kernel" Peter Hlavaty
Past few years our team was focusing on different operating systems including Microsoft windows kernel. Honestly our first pwn at Windows kernel was not that challenging. Number of available targets with friendly environment for straightforward pwn, from user up to reliable kernel code execution.
However, step by step, security policies continue to evolve, and it becomes more troublesome to choose ideal attack surface from various sandboxes. In addition, what steps to follow for digging security holes is highly dependent upon the chosen target. In general, a few common strategies are available for researchers to choose: e.g choose “unknown” one which hasn’t been researched before; Select well fuzzed or well audited one, or research on kernel module internals to find “hidden” attack surfaces which are not explicitly interconnected. In the first part of the talk we introduce our methodology of selecting, alongside with cost of tricks around to choose seemingly banned targets, illustrated by notable examples.
After getting hands on potential bug available from targeted sandbox, it is time for Microsoft windows taking hardening efforts to put attacker into corner. Strong mitigations are being introduced more frequently than ever, with promising direction which cuts lots of attack surface off, and a several exploitation techniques being killed. We will show difficulties of developing universal exploitation techniques, and demonstrate needed technical level depending on code quality of target. We will examine how different it becomes with era of Redstone and following versions even with those techniques and good vulnerability in hand. How it changed attacker landscape and how it will (and will not) kill those techniques and applications. However will it really change the game or not?
One of the many challenges of a distributed architecture is preserving the consistency of data across different systems. During this one-hour presentation, we are going to explore a number of strategies for maintaining consistency, going from the most basic options up to an automated recovery mechanism using compensations and reservations - what’s commonly referred to as a “saga” pattern. Our journey will be based on a hypothetical food delivery application on which we will analyze various decisions and their tradeoffs. The discussion will stay at an abstract, architectural level for the most part, with only a few code examples.
In the agenda:
- Idempotency and Retries
- 2 Phase Commit
- Eventual Consistency
- Compensations
- Reservations
- The Saga Pattern
Семинар по Node.js в КПИ 20 октября 2014. Докладчики: Тимур Шемсединов, Никита Савченко, Максим Петренко. Краткое содержание:
* Что такое Node.js и как работает JavaScript в V8
* Профессионалы расскажут, почему они выбрали Node.js
* Вы узнаете его сильные и слабые стороны и где его лучше применять
* Будет полный обзор особеностей и внутреннего строения Node.js
* Примеры внедрения и Highload-проекты
* Вопросы развертывания, хостинг, тестирования, и отладки
* Где и что учить, что читать, как осваивать
MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...Heechul Yun
This document describes MemGuard, an operating system mechanism for providing efficient per-core memory performance isolation on commercial off-the-shelf hardware. MemGuard uses memory bandwidth reservation to guarantee each core's minimum memory bandwidth. It then performs predictive bandwidth donation and on-demand reclaiming to redistribute excess bandwidth, improving overall utilization. Evaluation shows MemGuard isolates performance and eliminates over 50% slowdown of a foreground real-time task due to interference, while maximizing throughput via bandwidth sharing.
Jonathan Birch from Microsoft discusses how misuse of serialization in .NET can lead to remote code execution (RCE) vulnerabilities. He explains how serialization works and how untrusted data streams containing type information can be exploited to instantiate dangerous classes and execute arbitrary code. He provides advice on how to prevent these vulnerabilities, such as using serialization formats without type information, constraining allowed types, and validating streams have not been modified.
Introduction httpClient on Java11 / Java11時代のHTTPアクセス再入門tamtam180
This document provides an overview and refreshers on HTTP access in Java 11. It discusses HttpUrlConnection, Apache HttpClient, and Java's new HttpClient. For HttpUrlConnection, it covers GET requests, modifying request methods and headers, sending request bodies, cookies, proxies, redirects, basic authentication, and debugging. For Apache HttpClient, it discusses GET requests, Accept headers, gzip encoding, query strings, connection pools, modifying request headers and POST requests. It also covers cookies, redirects, retries and proxies for Apache HttpClient.
Social Engineering the Windows Kernel by James ForshawShakacon
One successful technique in social engineering is pretending to be someone or something you're not and hoping the security guard who's forgotten their reading glasses doesn't look too closely at your fake ID. Of course there's no hyperopic guard in the Windows OS, but we do have an ID card, the Access Token which proves our identity to the system and let us access secured resources.
The Windows kernel provides simple capabilities to identify fake Access Tokens, but sometimes the kernel or other kernel-mode drivers are too busy to use them correctly. If a fake token isn't spotted during a privileged operation local elevation of privilege or information disclosure vulnerabilities can be the result. This could allow an attacker to break out of an application sandbox, elevate to administrator privileges or even compromise the kernel itself.
This presentation is about finding and then exploiting the incorrect handling of tokens in the windows kernel as well as first and third party drivers. Examples of serious vulnerabilities such as CVE-2015-0002 and CVE-2015-0062 will be presented. It will provide clear exploitable patterns so that you can do your own security reviews for these issues. Finally I'll discuss some of the ways of exploiting these types of vulnerabilities to elevate local privileges.
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
The document describes the ftrace function tracing tool in Linux kernels. It allows attaching to functions in the kernel to trace function calls. It works by having the GCC compiler insert indirect function entry calls. These calls are recorded during linking and replaced with nops at boot time for efficiency. This allows function tracing with low overhead by tracing the indirect function entry calls.
This document provides information about x86 architecture including registers, flags, modes, common instructions, Intel and AT&T syntax, system calls, examples, and references. It defines the purpose of key registers like EAX, EBX, ESP and flags. It explains real and protect modes and differences between Intel and AT&T syntax. Examples demonstrate how to write assembly code and call system calls. References provided can be used to learn more about x86 assembly programming.
Metaworks is Metadata Oriented Application Framework
which is Inspired from the Adaptive Object Models and OMG Reflection, MDA.
The main approach is
Application Component Generation on the fly from metadata
Now Metaworks version 3 Is A POJO framework that
encourages the Domain-Driven Design and
Especially for developing model-driven applications (UML, BPMN, etc)
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesPeter Hlavaty
The document discusses exploiting TrueType font (TTF) vulnerabilities to achieve kernel code execution on Windows systems. It begins by describing the discovery of exploitable bugs in a TTF fuzzer. Despite mitigations like KASLR, NX, SMAP, and CFG, the researchers were able to bypass these protections through techniques like controlled overflows, abusing plain kernel structures, and function-driven attacks. They show how to leverage wild overflows, control kernel memory layout, and hijack control flow to achieve arbitrary code execution. The document emphasizes that OS design weaknesses allow bypassing modern defenses through clever bug chaining and memory manipulation.
The document discusses analyzing crashes using WinDbg. It provides tips on reconstructing crashed call stacks and investigating what thread or lock is causing a hang. The debugging commands discussed include !analyze, !locks, .cxr, kb to find the crashing function and stuck thread.
You didnt see it’s coming? "Dawn of hardened Windows Kernel" Peter Hlavaty
Past few years our team was focusing on different operating systems including Microsoft windows kernel. Honestly our first pwn at Windows kernel was not that challenging. Number of available targets with friendly environment for straightforward pwn, from user up to reliable kernel code execution.
However, step by step, security policies continue to evolve, and it becomes more troublesome to choose ideal attack surface from various sandboxes. In addition, what steps to follow for digging security holes is highly dependent upon the chosen target. In general, a few common strategies are available for researchers to choose: e.g choose “unknown” one which hasn’t been researched before; Select well fuzzed or well audited one, or research on kernel module internals to find “hidden” attack surfaces which are not explicitly interconnected. In the first part of the talk we introduce our methodology of selecting, alongside with cost of tricks around to choose seemingly banned targets, illustrated by notable examples.
After getting hands on potential bug available from targeted sandbox, it is time for Microsoft windows taking hardening efforts to put attacker into corner. Strong mitigations are being introduced more frequently than ever, with promising direction which cuts lots of attack surface off, and a several exploitation techniques being killed. We will show difficulties of developing universal exploitation techniques, and demonstrate needed technical level depending on code quality of target. We will examine how different it becomes with era of Redstone and following versions even with those techniques and good vulnerability in hand. How it changed attacker landscape and how it will (and will not) kill those techniques and applications. However will it really change the game or not?
One of the many challenges of a distributed architecture is preserving the consistency of data across different systems. During this one-hour presentation, we are going to explore a number of strategies for maintaining consistency, going from the most basic options up to an automated recovery mechanism using compensations and reservations - what’s commonly referred to as a “saga” pattern. Our journey will be based on a hypothetical food delivery application on which we will analyze various decisions and their tradeoffs. The discussion will stay at an abstract, architectural level for the most part, with only a few code examples.
In the agenda:
- Idempotency and Retries
- 2 Phase Commit
- Eventual Consistency
- Compensations
- Reservations
- The Saga Pattern
Семинар по Node.js в КПИ 20 октября 2014. Докладчики: Тимур Шемсединов, Никита Савченко, Максим Петренко. Краткое содержание:
* Что такое Node.js и как работает JavaScript в V8
* Профессионалы расскажут, почему они выбрали Node.js
* Вы узнаете его сильные и слабые стороны и где его лучше применять
* Будет полный обзор особеностей и внутреннего строения Node.js
* Примеры внедрения и Highload-проекты
* Вопросы развертывания, хостинг, тестирования, и отладки
* Где и что учить, что читать, как осваивать
MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...Heechul Yun
This document describes MemGuard, an operating system mechanism for providing efficient per-core memory performance isolation on commercial off-the-shelf hardware. MemGuard uses memory bandwidth reservation to guarantee each core's minimum memory bandwidth. It then performs predictive bandwidth donation and on-demand reclaiming to redistribute excess bandwidth, improving overall utilization. Evaluation shows MemGuard isolates performance and eliminates over 50% slowdown of a foreground real-time task due to interference, while maximizing throughput via bandwidth sharing.
Jonathan Birch from Microsoft discusses how misuse of serialization in .NET can lead to remote code execution (RCE) vulnerabilities. He explains how serialization works and how untrusted data streams containing type information can be exploited to instantiate dangerous classes and execute arbitrary code. He provides advice on how to prevent these vulnerabilities, such as using serialization formats without type information, constraining allowed types, and validating streams have not been modified.
Introduction httpClient on Java11 / Java11時代のHTTPアクセス再入門tamtam180
This document provides an overview and refreshers on HTTP access in Java 11. It discusses HttpUrlConnection, Apache HttpClient, and Java's new HttpClient. For HttpUrlConnection, it covers GET requests, modifying request methods and headers, sending request bodies, cookies, proxies, redirects, basic authentication, and debugging. For Apache HttpClient, it discusses GET requests, Accept headers, gzip encoding, query strings, connection pools, modifying request headers and POST requests. It also covers cookies, redirects, retries and proxies for Apache HttpClient.
Social Engineering the Windows Kernel by James ForshawShakacon
One successful technique in social engineering is pretending to be someone or something you're not and hoping the security guard who's forgotten their reading glasses doesn't look too closely at your fake ID. Of course there's no hyperopic guard in the Windows OS, but we do have an ID card, the Access Token which proves our identity to the system and let us access secured resources.
The Windows kernel provides simple capabilities to identify fake Access Tokens, but sometimes the kernel or other kernel-mode drivers are too busy to use them correctly. If a fake token isn't spotted during a privileged operation local elevation of privilege or information disclosure vulnerabilities can be the result. This could allow an attacker to break out of an application sandbox, elevate to administrator privileges or even compromise the kernel itself.
This presentation is about finding and then exploiting the incorrect handling of tokens in the windows kernel as well as first and third party drivers. Examples of serious vulnerabilities such as CVE-2015-0002 and CVE-2015-0062 will be presented. It will provide clear exploitable patterns so that you can do your own security reviews for these issues. Finally I'll discuss some of the ways of exploiting these types of vulnerabilities to elevate local privileges.
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
The document describes the ftrace function tracing tool in Linux kernels. It allows attaching to functions in the kernel to trace function calls. It works by having the GCC compiler insert indirect function entry calls. These calls are recorded during linking and replaced with nops at boot time for efficiency. This allows function tracing with low overhead by tracing the indirect function entry calls.
This document provides information about x86 architecture including registers, flags, modes, common instructions, Intel and AT&T syntax, system calls, examples, and references. It defines the purpose of key registers like EAX, EBX, ESP and flags. It explains real and protect modes and differences between Intel and AT&T syntax. Examples demonstrate how to write assembly code and call system calls. References provided can be used to learn more about x86 assembly programming.
Metaworks is Metadata Oriented Application Framework
which is Inspired from the Adaptive Object Models and OMG Reflection, MDA.
The main approach is
Application Component Generation on the fly from metadata
Now Metaworks version 3 Is A POJO framework that
encourages the Domain-Driven Design and
Especially for developing model-driven applications (UML, BPMN, etc)
Session 1 - 김득중 쇼핑검색 React 전환 경험 공유
2019년 9월 6일 네이버 쇼핑 개발자 meet up 행사인 'SHOWROOM' 에 발표된 자료입니다.
보다 자세한 내용은 http://nshop-developer.github.io 을 참고해주세요.
(2019년 9월 30일 오후 오픈 예정)
1. 생활법률, JSP프로그래밍 6-5
2014학년도 2 학기 3 학년 1 교시
2과목 JSP 프로그래밍 (36~60) 43. 클라이언트 요청 정보에서 이름이 “user-agent”인 헤더의 값을
읽고자 한다. 다음 중 올바른 서블릿 코드는 무엇인가? (2점)
① request.getParameter(“user-agent”);
② request.getHeader(“user-agent”);
③ response.getParameter(“user-agent”);
④ application.getInitParameter(“user-agent”);
44. 다른 페이지(to.jsp)로 이동시키기 위해 다음 밑줄 부분에 들어
가야 할 내용은 무엇인가? (3점)
<%@ page contentType="text/html; charset=euc-kr" %>
<HTML>
<BODY>
</BODY>
</HTML>
① <jsp:forward response.sendRedirect(“to.jsp”); %>
② < response.sendRedirect(“to.jsp”); >
③ <%= response.sendRedirect(“to.jsp”) %>
④ <% response.sendRedirect(“to.jsp”); %>
45. 아래의 두 JSP 페이지는 동일한 기능을 수행한다. 밑줄 부분에
공통으로 들어가야 할 내장 객체는 무엇인가? (4점)
...
<HTML>
<BODY>
<% String str=“Hello”;
%>
<%= str %>
</BODY>
</HTML>
...
<%
.print(“<HTML>”);
.print(“<BODY>”);
String str= “Hello, JSP”;
.print(str);
.print(“</BODY>”);
.print(“</HTML>);
%>
① out
② cout
③ response
④ System.out
46. 페이지 a에서 페이지 b를 include하거나 b로 forward가 일어난
후에 요청이 처리되었다. 이때 두 페이지 사이에서만 공유되
는 내장 객체는 무엇인가? (2점)
① pageContext
② request
③ session
④ application
47. 정적 인클루드는 JSP 페이지를 서블릿으로 번역하기 전에 지정
된 텍스트 파일을 먼저 삽입하는 것이다. 이 기능을 하는 것은
무엇인가? (3점)
① <%@ include file =“파일이름” %>
② <jsp:include page =“페이지이름” />
③ <c:import url =“url주소” />
④ <%@ taglib import=“클래스이름” %>
48. 쿠키에 대한 설명으로 잘못된 것은? (4점)
① 클라이언트가 만들어 서버로 보내는 데이터이다.
② 클라이언트의 상태 관리를 위한 데이터이다.
③ 쿠키는 요청 헤더 또는 응답 헤더에 담겨 전송된다.
④ 클라이언트 컴퓨터에 저장되는 데이터이다.
출제위원:방송대 김희천
출제범위:교재전체(해당 멀티미디어강의 포함)
36. 서블릿이 실행되기 위한 환경의 구성 요소로 볼 수 없는 것은?
(4점)
① 자바 실행 환경
② 웹 서버
③ 서블릿 컨테이너
④ 자바 스크립트(JavaScript)
37. 다음 중 POST 요청 방식을 설명한 것은? (3점)
① 서버에서 요청 URL에 지정된 자원을 삭제하도록 요청
② 간단한 데이터를 URL 뒤에 추가하여 자원을 요청
③ 데이터를 요청 메시지의 몸체에 포함시켜 전송하면서 요청
④ 프록시가 동적으로 접속할 수 있도록 지원
38. 다음 중 JSP를 이용한 웹 응용의 개발 도구에 해당하는 것은?
(3점)
① Tomcat ② Eclipse
③ Apache Server ④ MySQL
39. JSP 태그의 종류와 형태가 올바르게 짝지어진 것은? (4점)
① 선언 <%! ... %>
② 표현식 <%= ... />
③ 스크립트릿 <%-- ... --%>
④ 지시어 <jsp:태그이름 ... %>
40. 아래 내용에 관한 설명이다. 올바른 것은? (2점)
<%@ page contentType="text/html; charset=euc-kr" %>
① JSP 페이지에서 사용할 자바 클래스를 지정한다.
② JSP 페이지 자신의 문자인코딩을 지정한다.
③ 스크립트 요소에서 사용되는 프로그래밍 언어를 지정한다.
④ 응답 문서의 MIME 타입과 문자인코딩 방법을 지정한다.
41. 톰캣에 웹 어플리케이션을 배포하였다. web.xml 파일이나 .tld
파일은 다음 중 어디에 위치하는 것이 적당한가? (3점)
① [웹어플리케이션폴더]META-INF
② [웹어플리케이션폴더]WEB-INF
③ [웹어플리케이션폴더]WEB-INFclasses
④ [웹어플리케이션폴더]WEB-INFlib
42. 아래 폼으로부터 나오는 요청을 서블릿을 이용해 처리하고자
할 때, HelloServlet 클래스에서 구현해야 하는 메서드는 무엇
인가? (2점)
<form action="HelloServlet" method="get">
<input type="text" name="name">
<input type="submit" value="OK">
</form>
① init()
② start()
③ doPost()
④ doGet()
2. 생활법률, JSP프로그래밍 6-6
2014학년도 2 학기 3 학년 1 교시
49. 아래 소스를 보면 from.jsp에서 to.jsp로 포워딩이 일어난다.
from.jsp를 요청했을 때, 클라이언트가 보는 최종 실행 결과는
무엇인가? (3점)
<%@ page
ContentType="text/html;
charset=euc-kr" %>
<HTML>
<BODY>
from의 앞<br>
<jsp:forward page="to.jsp" />
from의 뒤<br>
</BODY>
</HTML>
<%@ page
contentType="text/html;
charset=euc-kr" %>
<HTML>
<BODY>
여기는 to.jsp
</BODY>
</HTML>
from.jsp to.jsp
① form의 앞
from의 뒤
② from의 앞
여기는 to.jsp
from의 뒤
③ 여기는 to.jsp
④ 여기는 to.jsp 페이지
50. 다음 중 클라이언트가 보낸 쿠키를 읽기 위한 문장은 무엇인가?
(cookie는 쿠키 객체, cookies는 쿠키 배열이다) (2점)
① cookies = request.getCookies();
② request.getHeader(“cookie”);
③ cookie = new Cookie(“이름”, “값”);
④ response.addCookie(cookie);
51. 세션에 대한 일반적 설명이다. 잘못된 것은? (4점)
① 하나의 웹 브라우저에서 들어오는 연관된 일련의 요청을
처리하기 위해 세션을 사용한다.
② 웹 브라우저당 1개의 세션이 유지된다.
③ 세션의 기본 유효시간은 클라이언트가 정해야 한다.
④ 웹 브라우저를 종료하면 세션은 삭제된다.
52. 로그아웃 요청을 처리하기 위해 세션을 삭제하려고 한다. 다음
중 세션을 삭제하는 문장에 해당하는 것은? (3점)
① session.invalidate();
② session.getAttribute(“logout”);
③ session.setAttribute(“login”, “userid”);
④ session.setMaxInactiveInterval(-1);
53. 아래 표준 액션에 관한 설명으로 올바른 것은? (3점)
<jsp:useBean id=“meminfo class=“member.Customer”/>
① 이름이 meminfo인 자바빈 객체를 사용(또는 생성)하겠다는
것이다.
② 객체의 유형은 member 클래스 내부에 정의된 Customer
클래스이다.
③ 이 객체는 해당 페이지와 같은 request 객체를 공유하는 페
이지들에서 접근 가능하다.
④ 이 객체는 해당 페이지가 속한 세션이 종료될 때까지 유지
되고 사용될 수 있다.
54. JSP를 실행하기 위한 환경이 설치된 후에, JSP 페이지에서
MySQL과 연동하는 프로그램을 작성하기 위해 추가로 설치해
야 하는 것은 무엇인가? (3점)
① Connector/J (JDBC 드라이버)
② ResultSet (클래스)
③ java.sql (클래스 패키지)
④ EL (표현 언어)
55. 템플릿 데이터 내부에서 사용할 때, 다음 코드와 동일한 의미를
가지는 스크립트 요소는 무엇인가? (2점)
<jsp:getProperty name="meminfo" property="age" />
① <% response.print(meminfo.getName(“age”)); %>
② <% System..print(meminfo.getName(“age”)); %>
③ <%= meminfo.getAge( ) %>
④ <%= meminfo.setName(“age”) %>
56. 다음 페이지를 실행할 때 결과가 다른 하나는 무엇인가? (2점)
<%@ page contentType="text/html; charset=euc-kr" %>
<% request.setAttribute("name", "Jimmy"); %>
<HTML>
<BODY>
a : ${requestScope.name} <br>
b : ${requestScope['name']} <br>
c : ${requestScope["name"]} <br>
d : <%=request.getParameter("name") %> <br>
</BODY>
</HTML>
① a가 표시되는 줄 ② b가 표시되는 줄
③ c가 표시되는 줄 ④ d가 표시되는 줄
57. 표현 언어에서 자바 메서드를 사용하기 위해 아래와 같은 taglib
지시어를 사용할 때, uri 속성의 값이 의미하는 것은? (2점)
<%@ taglib prefix="elfunc" uri="ElFunctions" %>
① web.xml 파일의 위치를 알려줌
② 메서드 정보를 기술한 TLD 파일을 식별할 수 있게 함
③ 함수를 정의한 자바 클래스의 이름을 의미함
④ 메서드를 호출할 때 사용할 접두어를 의미함
58. 아래 코드에서 prop은 스크립트릿에서 정의된 Map 유형의 변수
이다. 밑줄 부분에 들어가야 할 적당한 것은 무엇인가? (2점)
<c:set var="info" value="<%=prop%>" scope="request" />
<c:set target= property="host" value="localhost" />
① “prop” ② ${prop}
③ “${info}” ④ <%=info%>
59. JSTL의 코어 라이브러리에서 예외 처리에 사용되는 태그는 무
엇인가? (3점)
① <c:catch> ② <c:out>
③ <c:import> ④ <c:forEach>
60. 웹 어플리케이션 구조에 MVC 패턴을 적용할 때, 컨트롤러의
역할에 해당하는 것은? (2점)
① 비즈니스 로직을 수행함
② 결과를 보여주기 위한 HTML 문서를 만듦
③ 사용자의 요청을 받고, 처리를 지시하고, 결과를 받아 전달함
④ 통일된 방식으로 처리하기 위해 공통의 인터페이스를 구현함
3.
4.
5. 2016학년도 2 학기 3 학년 1 교시
생활법률, JSP프로그래밍 6-4
36. JSP에 관한 설명 중 잘못된 것은? (4점)
① JSP는 Java 언어에 기초한 웹 프로그래밍 기술이다.
② JSP 기술은 플랫폼에 종속적인 면이 강하다.
③ JSP 페이지는 서버에서 처리된다.
④ JSP 기술을 이용하여 동적 웹 문서를 만들 수 있다.
37. JSP 태그의 종류와 형태가 잘못 짝지어진 것은? (4점)
① 지시어 <%@ ... %>
② 표현식 <%= ... %>
③ 스크립트릿 <jsp:tagName ... />
④ 주석 <%-- ... --%>
38. JSP 페이지 실행 결과의 버퍼링에 관한 설명이다. 잘못된 것은?
(3점)
① 버퍼링은 클라이언트로 보낼 응답을 먼저 출력 버퍼에 기록
해 두는 것이다.
② 버퍼링을 사용하면 전체적인 데이터 전송 효율을 높일 수
있다.
③ 버퍼에 일단 기록된 내용은 삭제하거나 수정될 수 없다.
④ 버퍼의 용량은 적당해야 하며 너무 크면 자원이 낭비된다.
39. JSP 페이지에 대한 클라이언트 요청의 처리 과정을 설명한
것이다. 올바른 것은? (2점)
① JSP 페이지에 상응하는 애플릿이 존재하는가를 확인한다.
② JSP 페이지를 서블릿에 등록시키고 start( ) 메소드를 실행
한다.
③ 서블릿 프로그램으로의 변환과 컴파일 작업은 클라이언트의
요청이 있을 때 마다 매번 필요하다.
④ 상응하는 서블릿을 실행하여 클라이언트의 요청을 처리한다.
40. 서블릿 프로그램을 작성할 때, GET 방식의 요청을 처리하기
위해 구현해야 하는 서비스 메소드는 무엇인가? (4점)
① get( )
② goGet( )
③ doGet( )
④ DoGet( )
41. HTTP 요청 방식 중 GET과 POST에 관한 설명이다. 잘못된
것은? (2점)
① POST 방식은 상대적으로 보안에 취약하다.
② 많은 양의 데이터를 보내려면 POST 방식을 사용해야 한다.
③ GET 방식은 단순한 질의나 검색을 할 때 사용된다.
④ URL에 쿼리 문자열을 붙여 요청하는 것은 GET 방식이다.
42. 아래의 기능과 관련이 있는 JSP의 내장 객체는 무엇인가? (4점)
- addCookie() : 쿠키의 추가
- setStatus() : 상태코드의 설정
- getWriter() : 출력 스트림 객체의 생성
- sendRedirect() : 다른 페이지로의 이동
① cookie
② session
③ request
④ response
43. forward나 include 액션 태그를 사용하여 페이지 a에서 페이지
b를 실행시켜 요청을 처리할 때, 페이지 a에서는 request 객체에
속성을 저장하여 페이지 b에 데이터를 넘겨줄 수 있다. 이때 속
성의 저장을 위해 사용되는 메소드는 정확히 무엇인가? (2점)
① setAttribute(Object)
② setAttribute(String, Object)
③ setParameter(String, Object)
④ setInitParameter(String)
44. 다음 중 JSP의 내장 객체가 아닌 것은? (3점)
① cookie ② out
③ request ④ response
45. 아래 소스를 보면 from.jsp에서 to.jsp로 포워딩이 일어난다.
from.jsp를 요청했을 때, 클라이언트에게 전달되는 최종 HTML
문서의 내용은 무엇인가? (2점)
<%@ page contentType="text/html; charset=euc-kr" %>
<HTML>
<BODY>
from의 앞<br>
<jsp:forward page="to.jsp" />
from의 뒤<br>
</BODY>
</HTML>
from.jsp
<%@ page contentType="text/html;charset=euc-kr"
trimDirectiveWhitespaces="true" %>
<HTML>
<BODY>
여기는 to.jsp
</BODY>
</HTML>
to.jsp
① form의 앞 ② <HTML>
여기는 to.jsp <BODY>
from의 뒤 여기는 to.jsp
</BODY>
</HTML>
③ <HTML> ④ <HTML>
<BODY> <BODY>
from의 앞<br> from의 앞<br>
여기는 to.jsp <HTML>
from의 뒤<br> <BODY>
</BODY> 여기는 to.jsp
</HTML> </BODY>
</HTML>
from의 뒤<br>
</BODY>
</HTML>
46. JSP 페이지를 서블릿으로 변환하기 전에, 지정된 파일의 내용을
먼저 복사하여 해당 위치에 삽입할 때 사용되는 JSP 요소는
무엇인가? 이것은 공통으로 사용되는 스크립트 요소나 페이지
헤딩을 포함시킬 때 사용된다. (3점)
① <%@ include file=“파일 이름” %>
② <%@ taglib file=“파일 이름” %>
③ <jsp:include file=“파일 이름” />
④ <jsp:include import=“파일 이름” />
2과목 JSP프로그래밍 (36~60)
출제위원:방송대 김희천
출제범위:교재전체 (해당 멀티미디어강의 포함)
6. 2016학년도 2 학기 3 학년 1 교시
생활법률, JSP프로그래밍 6-5
47. 아래 including.jsp 페이지를 요청했을 때, 클라이언트의 브라우저
에서 표시되는 결과는 무엇인가? (3점)
<%@ page contentType=“text/html; charset=euc-kr” %>
<HTML>
<BODY>
<h3>before including</h3>
<jsp:include page=“included.jsp” flush=“false” />
<h3>after including</h3>
</BODY>
</HTML>
including.jsp
<%@ page contentType=“text/html; charset=euc-kr”%>
<HTML>
<BODY>
<h3>included</h3>
</BODY>
</HTML>
included.jsp
① included ② before including
included
③ included
after including
④ before including
included
after including
48. 위 47번 문제의 JSP 페이지에서 나타나 있는 요소로만 짝지어진
것은? (4점)
① 스크립트릿과 표현 언어
② 템플릿 텍스트와 내장 객체
③ 액션 태그와 지시어
④ 지시어와 스크립트릿
49. 쿠키에 관한 일반적 설명으로 올바른 것은? (3점)
① 클라이언트가 만들어 서버로 보내는 데이터이다.
② 클라이언트가 웹 사이트를 다시 방문할 때 저장해 두었던
쿠키를 전송한다.
③ 쿠키는 HTTP 요청 몸체나 응답 몸체에 담겨 전송된다.
④ 서버 컴퓨터에 저장되며 클라이언트 컴퓨터에는 저장되지
않는다.
50. 로그인/로그아웃을 구현하기 위해 쿠키를 사용한다고 가정하자.
다음 중 로그아웃의 처리를 위해 필요한 작업은 무엇인가? (3점)
① 로그인 상태의 확인을 위해 사용될 쿠키를 생성함
② 출력 버퍼를 플러쉬하여 응답 헤더를 변경할 수 없게 함
③ 같은 도메인에 있는 다른 호스트들과 쿠키를 공유하기 위해
쿠키의 도메인을 재설정 함
④ 쿠키의 유효시간을 0으로 만들어 쿠키를 삭제함
51. 클라이언트의 상태 관리에 사용되는 세션에 관한 일반적 설명
이다. 잘못된 것은? (3점)
① 세션은 웹 컨테이너에 저장되는 클라이언트의 상태 정보이다.
② 세션의 유효시간이란 세션이 처음 생성되어 삭제될 때까지의
기간이다.
③ 웹 브라우저당 1개의 세션이 유지된다.
④ 세션의 기본 유효시간은 설정에 따라 달라질 수 있다.
※ 다음 프로그램(request_scope.jsp)을 보고 물음에 답하여라. (52~53)
<%@ page contentType = "text/html; charset=euc-kr" %>
<HTML>
<HEAD>
<TITLE>자바 빈 예제</TITLE>
</HEAD>
<BODY>
< ㄱ id="mem" class="member.MemberInfo" scope=" ㄴ " />
<%
mem.setAge(10);
mem.setName("Jimmy");
%>
<jsp:forward page="scope_test.jsp" />
</BODY>
</HTML>
52. 자바빈 객체의 생성을 위한 액션 태그로서 밑줄 친 ㄱ에 들어갈
내용으로 적당한 것은? (2점)
① useBean
② jsp:useBean
③ setProperty
④ jsp:setProperty
53. 생성된 자바빈 객체를 scope_test.jsp 페이지와 공유하려 한다.
밑줄 친 ㄴ에 들어갈 내용으로 적당하다고 생각하는 것은? (2점)
① page
② request
③ sessionScope
④ Application
54. 다음 프로그램(el_example2.jsp)을 실행하여 나오는 HTML 폼에
이름을 입력한 후 확인 버튼을 누르면 입력했던 이름이 출력
되어야 한다. 밑줄 부분에 들어갈 내용으로 적당한 것은?
param은 표현 언어의 내장 객체이다. (2점)
<%@ page contentType="text/html; charset=euc-kr" %>
<% request.setCharacterEncoding("euc-kr"); %>
<HTML>
<HEAD><TITLE>param 내장 객체
이용하기</TITLE></HEAD>
<BODY>
<form action="el_example2.jsp" method="post">
이름 : <input type="text" size=20 name="myName" >
<input type="submit" value="확인">
</form>
<p>
이름 : <br>
</BODY>
</HTML>
① ${param.name}
② ${param[name]}
③ ${param.myName}
④ ${param[myName]}
55. 세션을 사용하여 로그아웃을 처리할 때 session 객체 자체를
삭제하는 방법이 있다. 이것을 위해 적당한 것은? (3점)
① session.getAttribute()
② session.setAttribute()
③ session.remove()
④ session.invalidate()
7. 2016학년도 2 학기 3 학년 1 교시
생활법률, JSP프로그래밍 6-6
56. 다음은 JSTL의 코어 라이브러리를 사용한 예이다. 밑줄 친
부분에 들어갈 내용으로 알맞은 것은? (3점)
<%@ page contentType="text/html; charset=EUC-KR" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<body>
<c:if test="true">
무조건 실행 됩니다.<br>
</c:if>
… …
① prefix="c"
② prefix="core"
③ postfix="catch"
④ postfix="import"
※ 다음은 회원 관리 시스템에서 기존 회원의 정보를 삭제하기 위한
메소드이다. 회원의 아이디를 넘겨주면 removeMember( )는
member 테이블에서 해당 회원의 정보를 삭제한다. 물음에
답하여라. (57~58)
… …
public int removeMember(String id) {
PreparedStatement pstmt = null;
String query = “delete from member where id=?”;
int res = 0;
openConnection();
try {
pstmt = con.prepareStatement(query);
pstmt. ㄱ ;
res = pstmt. ㄴ ;
… …
57. 밑줄 친 ㄱ에 들어갈 내용으로 적당한 것은? (2점)
① getString(“id”)
② getString(“pass”)
③ setString(1, id)
④ setString(2, pass)
58. 밑줄 친 ㄴ에 들어갈 내용으로 적당한 것은? (2점)
① executeQuery( );
② executeUpdate( );
③ getParameter("id")
④ sendRedirect("member");
59. MVC 패턴에 관한 설명으로 잘못된 것은? (3점)
① 컨트롤러, 모델, 뷰의 역할이 구분된다.
② 컨트롤러는 클라이언트 요청의 접수와 웹 어플리케이션 전체
의 흐름 제어를 담당한다.
③ 모델은 컨트롤러의 수행 요청을 받아 비즈니스 로직을 수행
한다.
④ 프레젠테이션 로직과 비즈니스 로직이 명확히 혼합되어 있다.
60. 설정 파일을 이용한 커맨드 패턴의 적용에 관한 설명이다.
잘못된 것은? (2점)
① 커맨드에 관한 정보를 별도의 설정 파일에 저장한다.
② 서블릿은 실행될 때마다 설정 파일을 읽어 커맨드를 처리한다.
③ 새로운 커맨드를 추가할 경우 소스 코드를 수정하고 다시 컴
파일해야 한다.
④ 새로운 커맨드를 추가할 경우 설정 파일을 수정해야 한다.