728x90
반응형
목차
1. APK 추출하기
2. JAR 변환하기
3. JAR 디컴파일
-
1. dex2jar download
  - apk/dex to jar
2. mapping download
  - proguard reverse
3. JD-GUI download
  - 소스코드 조회
4. AXMLPrinter2.jar download
  - packageinfo(for AndroidManifest.xml)
5. apktool download

개발자가 구현한 JAVA 코드 및 라이브러리가 APK 파일로 컴파일됨

안드로이드 가상머신에서 실행되는 DEX "classes.dex"로 저장됨

DEX를 직접 디컴파일하는 것보다, JAVA 디컴파일러로 열어보기 위해 JAR로 변환하는 작업을 진행할 것

APK(DEX)를 JAR로 변환하기 위해 DEX2JAR 사용

1. dex2jar download

https://github.com/pxb1988/dex2jar

 

다운로드 이후, 명령 프롬프트의 해당 동일 경로에 apk 파일 위치시키고, 코드 입력하여 확장자 변경

// - Linux: APK/DEX를 JAR로 변환
dex2jar -f -o app.jar app.apk
dex2jar -f -o app.jar app.dex

// - Windows
d2j-dex2jar.bat app.apk
d2j-dex2jar.bat app.dex

* DEX란? Dalvik Executable, 안드로이드의 실행 파일(윈도우 실행파일: PE)

다음과 같이 jar 파일 생성되는 것을 확인


2. mapping download

mapping.jar
0.67MB

명령 프롬프트에 아래와 같이 입력 후, 

java -jar mapping.jar​

Mapping Utility에

Load Jar: 언패킹할 jar 파일(e.g. app-dex2jar.jar)

Load Mappings: mapping.jar 파일 입력 후

Proguard Reverse 버튼 누르면,

다음과 같이 app-dex2jar.jar.correlated.jar 파일 생성

이후 jd-gui 프로그램 사용하여 소스코드 확인


3. JD-GUI download

http://java-decompiler.github.io/

jd-gui-windows-1.6.6.Zip
1.30MB

dex2jar를 사용하기 위해서는 apk 파일 또는 apk 내부 classes.dex 파일을 인자값으로 전달하면 됨

exe 파일 실행하여 jar 파일 open

해당 앱은 proguard로 난독화를 수행하지 않았는지.. mapping 이전과 이후 코드가 동일하게 나타남


4. AXMLPrinter2.jar download

AXMLPrinter2.jar
0.02MB

apk 파일 내에 있는 AndroidManifest.xml 파일을 가져와서, AXMLPrinter2.jar 파일 동일 경로에 위치

이후 다음 명령어 입력

(apkinfo.txt: 패키지 파일 내부를 확인할 수 있는 텍스트 파일 형식으로, 파일명은 임의로 지정)

java -jar AXMLPrinter2.jar AndroidManifest.xml > apkinfo.txt

다음과 같이 apkinfo.txt 파일이 생성되며, 패키지명 등 확인 가능


5. apktool download

https://ibotpeaches.github.io/Apktool/

apktool_2.6.1.jar
19.06MB

java -jar apktool_2.6.1.jar d app.apk

 

 

728x90
728x90
728x90
반응형
목차
1. 과기정통부, 소프트웨어 역량검정을 통해 디지털 인재 성장 지원(220907)
2. 2022 서울안보대화 사이버워킹그룹 회의 개최 (220906)
3. 과학기술&ICT 정책·기술 동향 221호 (220905)

1. 과기정통부, 소프트웨어 역량검정을 통해 디지털 인재 성장 지원 (220907)

(출처: 과학기술정보통신부, 보도자료, 소프트웨어정책관 소프트웨어정책과 남철기 과장(044-202-6320), 김종순 사무관(044-202-6325))

  • 제18회 소프트웨어 역량검정 정기평가 시행(10.29.(토)) / 성적발표(11.28.(월))
  • 디지털 전환 촉진과 소프트웨어 실무인재 부족 해소 지원
  • 입문·초급자의 소프트웨어 역량평가가 가능하도록 평가제도 개편 추진

2. 2022 서울안보대화 사이버워킹그룹 회의 개최 (220906)

(출처: 대한민국 국방부, 보도자료, 국방정책실 사이버전자기정책과 하대봉 국장(02-748-6700), 김신애 과장(02-748-5980))

  • "미래 사이버 전 양상의 진화와 사이버 군사전략의 방향"이란 주제로 2022 서울안보대화 사이버워킹그룹(Cyber Working Group) 역대 최대규모로 개최
  • 사이버 공간에서의 불법적인 행위에 대해 초국가적으로 공유하고 공동대응하는 것을 제안

3. 과학기술&ICT 정책·기술 동향 221호 (220905)

(출처: 글로벌 과학기술정책정보 서비스 S&T GPS, 과학기술&ICT 정책·기술 동향 221호)

가트너, 2022년 유망(Emerging)기술 하이프 사이클 발표

  • 기술 성장주기는 ①기술 출현(Technology Trigger) ②기대 정점(Peak of Inflated Expectations) ③환상 소멸(Trough of Disillusionment) ④기술 성숙(Slope of Enlightenment) ⑤안정 단계(Plateau of Productivity)로 구분
  • 신기술 도입 시기와 포트폴리오 구축, 새로운 비즈니스 창출, 신성장동력 발굴 시 고려해야 할 기술과 트렌드를 업계 관점에서 제시하는 것이 특징

<자료> Gartner, 2022.8.10

 

 

728x90
728x90
728x90
반응형

안현배의 예술수업
안현배 작가: 예술사학자, 사회학 및 역사의 관계 속에서 살피는 예술수업

  • 인상파의 승리와 다양성의 탄생. 19세기 새로운 예술의 시대
  • 오르세 미술관 인상파와 예술사
  • 혁신의 요구, 변화의 시작 - 마네의 무한도전

에두라르 마네(1832년 1월 23일 ~ 1883년 4월 30일)
프랑스의 인상주의 화가
19세기 현대적인 삶의 모습에 접근하려 했던 화가들 중 하나
시대적 화풍이 사실주의에서 인상파로 전환되는 데 중추적 역할
낭만주의(Romanticism): 19세기 전반(1820~1830), 합리주의에 반대, 개인의 낭만/관심사를 중요시함, 귀족적 취향이 고려되지 않음
사실주의(Realism): 19C 이전, 구스타브 쿠르베, 도미에, 구체적인 현실에 대한 묘사, 당시 서민의 삶 속에서 작품의 주제를 찾음
인상주의: 프랑스 중심의 근대 예술운동, 빛에 따른 색의 변화라는 새로운 시각적 현실의 묘사에 관심

Le Déjeuner sur l'herbe, 1863
풀밭위의 점심 식사


Olympia, 1863
올랭피아


La naissance de vénus - Alexendre Cabanel(산드로 보티첼리)
비너스의 탄생


  • 모더니즘의 시작이 왜 마네 부터일까?
  • 인상주의와 모더니즘

모더니즘: 전통적인 기반에서 급진적으로 벗어나려는 20세기 서구 문학, 예술상의 경향
산업혁명과 역사: 사회와 환경의 변화, 그리고 새로운 세대의 시작

  • 해돋이의 인상 클로드 모네
  • 투쟁과 설득, 관점의 변화
  • 스테판 말라르메
  • 우리는 시대와 상관 없이 상징의 발달을 추적하고 싶다. 그것이 순전히 꿈이더라도,
  • 우리는 개성을 위하여, 그리고 행동의 중앙에 있기 위하여,
  • 광장과 거리의 장식을 쫓아다니기보다는 관념의 투쟁을 보완하고 싶다.
  • 우리 예술의 근본적 목적은 객관을 주관화하는 것이 아니라 주관을 객관화 시키기 위한 것이다.
  • 화상과 비평, 예술가
  • 르느와르 물랭 들 라 걀레뜨
  • Daughters of Catulle Mendes, 1888
  • 다양한 시도와 창의성, 예술의 길 / 상징주의
  • 테오도르 샤세리오 터키탕
  • 상징주의의 등장과 다양성에 대한 고민, Le reve
  • 페르낭 크누프 애무
  • Ecole de platon 1898, 260 x 605 cm
  • 제임스 앙소르 가면들
  • 레르미트 추곡수매
  • "우리는 지나간 시대를 어떤 방법으로 이해할 수 있을까?"


끌로드 모네(Claude Monet, 1840~1926)
에두아르 마네(Edouard Manet, 1832~1883)
공통점: 인상주의 개척, 전통적인 미술 거부
차이점: 모네는 검은색을 사용하지 않음(그림자 표현: 파란색과 보라색)

728x90
728x90
728x90
반응형
목차
1. 시퀀스 활용
  1) pop()
  2) count()
  3) split()
  4) join()
2. Tuple(튜플)
3. Dictionary(사전형)
  1) range()
  2) for-range(a, b)
  3) for-range(a)
4. while
  1) 변수 수정
  2) break문

[Review] (4주차) 반복문

2022.08.08 - [Development/Python] - [Python] 04 반복문 - week.04

 

[Python] 04 반복문 - week.04

목차 1. 반복문 2. for-sequence문 3. for-range()문 1) range() 2) for-range(a, b) 3) for-range(a) 4. while 1) 변수 수정 2) break문 [Review] (3주차) 리스트 2022.07.28 - [Development/Python] - [Python]..

sarahee.tistory.com


1. 시퀀스 활용

Point I
list.pop(i) : 인덱스 i의 원소를 제거 후 반환

lst = [1, 2, 3, 4, 5]
box = lst.pop(0) # lst에서 1을 제거 후 반환, 이 경우에는 변수 box에 대입
print(lst) 
# [2, 3, 4, 5]

print(box)
# 1 

Point II
seq.count(d) : 시퀀스 내부의 자료 d의 개수를 반환

carrot = "Hi Rabbit!"
print(carrot.count("i"))

## 실행 결과 ##
2

Point III
str.split(c) : 문자열 c를 기준으로 문자열 str을 쪼개서 리스트를 반환

ours = "나,너,우리"
print(ours.split(","))
# ['나', '너', '우리']

Point IV
str.join(list) : str을 기준으로 list를 합쳐서 문자열을 반환

coffee = ['a', 'm', 'e', 'r', 'i', 'c', 'a', 'n', 'o']
print("".join(coffee)) # 빈 문자열("")을 기준으로 합치기
# americano

2. Tuple(튜플)

Point I
여러 자료를 담을 수 있으면서, 변하지 않는 자료형

Point II
() - 소괄호로 묶어 표현

tup = (1, 2, 3, 4, 5)

Point III
원소가 하나라면 반드시 원소 뒤에 ,을 적어주어야함

tup_one = (1,)

Point IV
시퀀스 자료형의 성질을 지님

cute = ('c', 'a', 't')
print(cute[1])  #인덱싱
#'a'

print(cute[1:]) #슬라이싱
#('a', 't')

print('e' in cute) #in연산자
#False

print(len(cute)) #len연산자
#3

print(cute + ('e', 'g', 'o', 'r', 'y')) #연결연산
#('c', 'a', 't', 'e', 'g', 'o', 'r', 'y')

print(cute * 3) #반복연산
#('c', 'a', 't', 'c', 'a', 't', 'c', 'a', 't')

Point V
자료를 추가, 삭제, 변경할 수 없음

hero = ("ant", "man")
hero.append("wasp") #Error
hero.remove("man") #Error
hero[0] = "iron" #Error

3. Dictionary(사전형)

Point I
짝꿍(Key → Value)이 있는 자료형

Point II
{} - 중괄호로 묶어서 표현

hp = {"gildong" : "010-1234-5678"}

Point III
key를 알면 value를 알 수 있음

dic = {"apple":"사과", "banana":"바나나"}
print(dic["apple"])
# 사과

Point IV
del 키워드로 Dictionary의 원소 삭제
리스트의 원소를 삭제하는 것도 가능

dic = {"apple":"사과", "banana":"바나나"}
del dic["apple"]
print(dic)
# {"banana":"바나나"}

Point V
Key는 변할 수 없는 자료형이여야 함

dic = {[1, 3, 5]:"odd"} #Error
dic = {(2, 4, 6):"even"} 

[Next] (6주차) 함수와 메서드

2022.11.08 - [Development/Python] - [Python] 02 함수와 메서드 - week.06

 

[Python] 02 함수와 메서드 - week.06

목차 1. 함수 1) 내장 함수 ① max(), min() ② sum(), len() ③ def 2) 매개변수 3) 전역변수 4) 지역변수 2. 메서드 [Review] (5주차) 기초 자료형2 2022.09.05 - [Development/Python] - [Python] 01 기초 자료형 II - week.05 [Pyt

sarahee.tistory.com

 

728x90
728x90

'Development > Python' 카테고리의 다른 글

[Python] 03 모듈과 패키지 - week.07  (0) 2023.01.21
[Python] 02 함수와 메서드 - week.06  (0) 2022.11.08
[Python] 04 반복문 - week.04  (0) 2022.08.08
[Python] 03 리스트 - week.03  (0) 2022.07.28
[Python] 02 조건문 - week.02  (0) 2022.07.22
728x90
반응형

UNIT 68. Benefits of the FTA

 

Min-Soo: Emma, have you seen my new smart phone?

 

Emma: No, I haven't. Let me see it... . It looks very nice.

 

Min-Soo: It's a Samsung Galaxy with 4G LTE speed.

 

Emma: I'm not sure what that means, but it sounds impressive.

 

Min-Soo: Yeah, and it has an Android 4.4 KitKat operating system.

Android KitKat: 구글이 개발한 안드로이드 계열의 안드로이드 버전

Emma: You're losing me.

 

Min-Soo: With a Qualcomm Snapdragon 805 2.7GHz quad-core processor.

Qualcomm Snapdragon: 퀄컴에서 개발한 스마트폰, 태블릿, 스마트북 등을 위한 모바일 SoC

Emma: You're way over my head now!

 

Min-Soo: Oh, and Bluetooth 4.0 technology with a 5.7" Super AMOLED HD touch screen.

 

Emma: I should call you "Mr. High Tech," and I have to admit: Korea makes the best smart phones.

 


Exported products going to other countries.

 

Imported products coming to Korea.


The United States and the Republic of Korea signed the United States-Korea Free Trade Agreement (KOORUS FTA) on June 30, 2007.

 

However, it took years of discussions before the agreement was approved by both legislatures and came into effect on March 15, 2012.

 

Over the years of discussion, numerous opponents in both Korea and the U.S. railed against the agreement, stating that it would have adverse effects on agriculture, automobiles, and other industries.

 

Of course, supporters claimed that the agreement would be beneficial to both countries.

 

 

The FTA has now been in effect for more than three years, so one may ask:

 

who has benefited the most from the agreement?

 

According to the Wall Street Journal, the clear winner has been Korea.

 

While bilateral trade between the two countries rose dramatically, the South Korean trade surplus with the U.S. only widened during this period.

 

The following statistics show Korea's trade surplus with the U.S. during the relevant years:

 

2011, 13.1 billion; 2012, 16.6 billion; 2013, 20.7 billion; 2014, 25.1 billion.

 

Also, during this period, Korea's exports to the U.S. grew faster than their exports to the rest of the world.

 

Korean opponents of the FTA had claimed that it would devastate the agricultural sector in Korea due to massive imports of American agriculture and livestock products.

 

These claims were proven to be groundless as Korea's imports of U.S. agriculture and livestock products dropped 20% while Korea's exports of the same type of product increased 20%.

 


What do you think?

(1) Why does Korea's trade surplus with the U.S. keep increasing?

 

 

(2) Should Korea sign more free trade agreements with other countries?

 

 

(3) What are your favorite made-in-Korea products?

 

 

(4) What American products do you like the most?

 

 

(5) What American products do you like the least?

 

 

728x90
728x90
728x90
반응형
목차
1. 과기정통부 2023년도 정부 예산(안) 확정 (220831)
2. 오늘부터 스마트폰 이심(eSIM) 이용이 가능합니다! (220831)
3. 추석 명절, 택배와 금융거래 사칭 문자사기 주의! (220831)
4. 과기정통부, 소속·산하기관 대상 민간 보안전문가(화이트 해커)를 활용한 사이버 모의 침투훈련 실시 (220902)
5. 2022년 상반기 악성코드 은닉사이트 탐지 동향 보고서 (220830)
6. TTPs #8: Operation GWISIN - 맞춤형 랜섬웨어 공격 전략 분석 (220902)

1. 과기정통부 2023년도 정부 예산(안) 확정 (220831)

(출처: 과학기술정보통신부, 보도자료, 정책기획관 기획재정담당관 재정팀 이주헌 팀장(044-202-4430), 장일해 서기관(044-202-4431))

과기정통부, 기술패권경쟁 시대 초격차 전략기술 확보와 국가 디지털 혁신에 집중

2023년 과기정통부 예산안, 금년 추경 대비 2.3% 증액된 18.8조 규모

  • 미래 혁신기술 선점
  • 인재양성 및 기초연구 지원
  • 디지털 혁신 전면화
  • 모두가 행복한 기술 확산에 중점 투자

2023년 정부연구개발(R&D) 예산안, '22 대비 3.0% 증액된 30.7조원 편성

  • 초격차 전략기술
  • 미래 기술
  • 디지털 전환
  • 탄소중립
  • 인력양성 등 국가전략기술 및 미래 성장잠재력 확충에 중점 투자


2. 오늘부터 스마트폰 이심(eSIM) 이용이 가능합니다! (220831)

(출처: 과학기술정보통신부, 보도자료, 통신정책관 통신이용제도과 이정순 과장(044-202-6650), 김성희 사무관(044-202-6651))

9월 1일부터 이통3사(SKT, KT, LGU+) 및 알뜰폰사에서 스마트폰 이심(eSIM)을 이용하여 서비스 가입이 가능

* 이심(eSIM): 유심(USIM)과 동일한 역할을 하며, 칩을 스마트폰에 삽입하여 이용하는 유심(USIM)과 달리 단말에 내장된 칩에 가입자 정보를 다운로드 받아 이용하는 형태의 가입자 식별 모듈(SIM)

  • 이심(eSIM)이 내장된 스마트폰은 유심(USIM)과 이심(eSIM)을 이용하여 하나의 스마트폰으로 두 개의 전화번호를 개통하는 것도 가능(듀얼심)
  • 두 개의 전화번호를 개통하는 경우 통신사를 달리하여 가입하는 것도 가능
  • 선택약정 요금할인도 각각의 개통 건에 적용 가능

3. 추석 명절, 택배와 금융거래 사칭 문자사기 주의! (220831)

(출처: 과학기술정보통신부, 보도자료, 정보보호네트워크정책관 사이버침해대응과 설재진 과장(044-202-6460), 김승열 사무관(044-202-6461))

택배 배송과 금융 지원 안내 등을 사칭한 문자결제사기(스미싱*), 지인 명절인사 등으로 위장한 메신저 피싱 증가로 인한 이용자의 피해 주의 당부

* 스미싱: 문자메시지(SMS)와 피싱(Phishing)의 합성어, 악성 앱 주소가 포함된 휴대폰 문자메시지를 전송하여 이용자 유도 및 금융·개인정보 탈취


4. 과기정통부, 소속·산하기관 대상 민간 보안전문가(화이트 해커)를 활용한 사이버 모의 침투훈련 실시 (220902)

(출처: 과학기술정보통신부, 보도자료, 정책기획관 정보보호담당관 김태영 과장(044-202-4480), 박순재 사무관(044-202-4483))

  • 과학기술정보통신부는 최근 전 세계적인 사이버 공격 증가 추세에 따라 소속·산하기관의 위기대응 역량제고를 위해 '2022년 과기정통부 사이버 모의침투 대응훈련' 실시
  • 민간 보안 전문기업·전문 연구기관 간의 협력

5. 2022년 상반기 악성코드 은닉사이트 탐지 동향 보고서 (220830)

(출처: 한국인터넷진흥원 KISA 인터넷보호나라 & KrCERT, 자료실 > 보고서, 탐지대응팀)

한국인터넷진흥원 사이버침해대응본부는 악성코드 은닉사이트 탐지 시스템(MCF, Malicious Code Finder)을 통해 국내 전체 홈페이지를 대상으로 악성코드 은닉 여부를 점검하고 있음

* 악성코드 은닉사이트: 악성코드 자체 또는 악성코드를 유포하는 주소(URL)를 숨기고 있는 홈페이지

  • 악성코드 경유지 주요 업종 '제조, 건강/의학, 교육/학원'
  • IoT 악성코드(Mozi) 관련 유포지 탐지 지속
  • 이모텟(Emotet) 악성코드 관련 유포지 탐지
  • 정보유출 악성코드 지속 유포
  • 폴리나(Folina) 취약점을 이용한 악성코드 유포 탐지
  • 가상화폐 채굴 악성코드 탐지

* 이모텟(Emotet) 악성코드: 금융정보 탈취를 위한 악성코드, 2014년에 최초 탐지

* 폴리나(Folina) 취약점: Microsoft Office에 존재하는 제로데이 취약점을 악용하여 Word에서 URL 프로토콜을 사용해 마이크로소프트 지원진단도구(MSDT)를 호출할 때 원격 코드가 실행되는 취약점


6. TTPs#8: Operation GWISIN - 맞춤형 랜섬웨어 공격 전략 분석 [Ver.KOR] (220902)

(출처: 한국인터넷진흥원 KISA 인터넷보호나라 & KrCERT, 자료실 > 보고서, https://thorcert.notion.site/TTPs-8-Operation-GWISIN-c3483353d20241b3a313fa4a8726302a)

  • 사이버보안에서 유명한 고통의 피라미드(The Pyramid of Pain)
  • 방어자가 TTP(Tactic, Technique, Procedure)와 같은 공격자의 전략과 전술, 그리고 그 과정을 이해하고 방어 체계를 운영하는 것이 가장 효과적임을 표현

<자료> 한국인터넷진흥원

 

 

728x90
728x90
728x90
반응형
목차
1. 인공지능 기술 활용을 위한 안드로이드 악성코드(악성앱) 특징정보(220816)
2. 차세대 네트워크(6G) 산업 기술개발사업 공청회 개최 (220824)
3. 자동차 사이버보안 표준 및 보안 기술 동향 (220824)
4. 과학기술&ICT 정책·기술 동향 (220819)

1. 인공지능 기술 활용을 위한 안드로이드 악성코드(악성앱) 특징정보 (220816)

(출처: 한국인터넷진흥원 KISA 인터넷보호나라 & KrCERT, 자료실 > 보고서, 종합분석팀(jjw@kisa.or.kr))

인공지능 기술 활용을 위한 "안드로이드 악성코드(악성앱) 특징정보" (6개 카테고리의 43가지 특징정보)

  • 메타데이터(Metadata) : 기본적인 애플리케이션 정보
  • 정적정보(Static Info) : 함수, API, 서비스 정보, 문자열 등 코드 내에서 확인 가능한 정보
  • 동적정보(Dynamic Info) : 파일 접근/삭제 등 악성앱 실행 시 동작하는 주요 행위 정보
  • 네트워크(Network) : 악성앱 실행 시 접속 시도 및 파일/메모리 내 포함된 URL/IP 정보
  • ATT&CK Matrix : 악성앱을 전략, 전술별(TTPs) 행위를 기술단위 별로 추출한 정보
  • 기타 정보(ETC) : 악성앱의 Bytecode, 분류 정보 등 기타 정보


2. 차세대 네트워크(6G) 산업 기술개발사업 공청회 개최 (220824)

(출처: 과학기술정보통신부, 보도자료, 정보보호네트워크정책관 네트워크정책과 심규열 팀장(044-202-6415), 도하림 사무관(044-202-6426))

  • 우리나라는 작년부터 차세대 네트워크(6G) 원천기술개발을 추진 중
  • 하지만 경쟁국 대비 작은 투자 규모로 세계 주도권 경쟁에 뒤처질 우려가 있는 만큼 투자를 확대해야 함
  • 차세대 네트워크(6G)는 미래 정보기술 산업의 을 새롭게 바꿀 수 있는 디지털 시대 핵심 기반이자 국제 경쟁 향방을 가를 필수전략기술인 만큼, 관심 필요

3. 자동차 사이버보안 표준 및 보안 기술 동향 (220824)

(출처: 정보통신기획평가원, 주간기술동향 2060호, MDS 인텔리전스 고의석 매니저(031-627-3053, nkm@mdsit.co.kr))

  • 기존 자동차의 가장 큰 이슈인 안전(Safety)
  • 정보보안전문가가 자동차에 탑재된 ECU(Electronic Control Unit)의 취약점을 이용하여 해킹에 성공한 사례
  • 완성차 제조업체는 CSMS(Cyber Security Management System) 인증과 각 차종에 대한 형식승인을 받아야 함(두 가지 표준 준수)

<자료> ISO, &ldquo;Information technology - Security techniques - Information security management systems Overview and vocabulary,&rdquo; ISO/IEC 27000, 2018, p.19, &lsquo;ISMS family of standards relationships&rsquo; 재구성(정보통신기획평가원)
<자료> ISO, &ldquo;Information technology Security techniques information security management systems Requirements,&rdquo; ISO/IEC 27001, 2013, p.28, A.10 재구성(정보통신기획평가원)

ISO 27001 대응을 위한 공급망에 대한 보안 기술

암호 키 관리 시스템

  • 개발 및 양산 시스템과 물리적으로 분리된 안전한 공간에 보관해야 함
  • 암호 키에 대한 표준 프로토콜인 KMIP(Key Management Interoperability Protocol)을 준수해서 전달해야 함

사설 인증 시스템

  • 자동차 공급망 전 과정에 상호 인증을 통해 보안을 제공하는 시스템
  • 사설 인증 시스템과 암호 키 관리 시스템을 결합하면, 자동차 공급망 전 과정에 안전한 암호 키 및 기밀 데이터 공유가 가능

분리 기법

  • 주요 정보 접근 인원 및 시스템을 최소화하여 보안을 제공하는 기법
  • 방화벽과 같은 망 분리나 비밀 취급 인가 등급에 따른 정보 접근 등의 방법을 통해 분리 기법 적용이 가능
  • 자동차 생산 환경: 암호 키를 기준으로 분리(개발용 암호 키, 양산용 암호 키)

4. 과학기술&ICT 정책·기술 동향 (220819)

(출처: 글로벌 과학기술정책정보 서비스 S&T GPS, 과학기술&ICT 정책·기술 동향 220호)

  • OECD, 우주 경제를 측정하는 방안의 과제와 해결책 제시, 우주 경제에 대한 평가를 개선하기 위한 정책 제언을 담은 안내서 발표('22.7)
  • 일본, 블록체인 기반 환경을 전담할 '웹3.0 정책추진실' 출범

 

 

728x90
728x90
728x90
반응형

[Review] (9주차) 실습

2022.08.26 - [Development/Swift] - [Swift] iOS 앱 개발(Xcode) Byte Degree - week.09

 

[Swift] iOS 앱 개발(Xcode) Byte Degree - week.09

[Review] (8주차) 실습 2022.08.26 - [Development/Swift] - [Swift] iOS 앱 개발(Xcode) Byte Degree - week.08 [Swift] iOS 앱 개발(Xcode) Byte Degree - week.08 [Review] (7주차) 실습 2022.08.25 - [Develop..

sarahee.tistory.com


2-5번째 내비게이션 탭 연동하기

첫번째로, 네번째 탭 연결

Main 탭의 Custom Class - Class, Identify - Storyboard ID 설정(CharViewController → FrameworkListViewController)

Inherit Module From Target 체크

 

기존 코드

//
//  MainTabBarController.swift
//  CarrotHomeTab
//
//  Created by sehee on 2022/08/24.
//

import UIKit

// 1. 탭이 눌릴 때마다, 그에 맞는 네비게이션 바를 구성하고자 함
// - 탭이 눌리는 것을 감지
// - 감지 후에, 그 탭에 맞게 네비게이션 바 구성 업데이트 필요


// 3. 앱이 시작할 때, 네비게이션바 아이템 설정을 완료하고 싶음
// - 네비게이션 바를

class MainTabBarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        delegate = self
    }
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        updateNavigaitionItem(vc: self.selectedViewController!)
        //self.selectedIndex
        //self.selectedViewController
    }
    
    private func updateNavigaitionItem(vc: UIViewController) {
        switch vc {
        case is HomeViewController:
            let titleConfig = CustomBarItemConfiguration(
                title: "정자동",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            let searchConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "magnifyingglass"),
                handler: { print("--> search tapped") })
            
            let searchItem = UIBarButtonItem.generate(with: searchConfig, width: 30)
            
            let feedConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "bell"),
                handler: { print("--> feed tapped") })
            let feedItem = UIBarButtonItem.generate(with: feedConfig, width: 30)
            
            //let titleItem = UIBarButtonItem(title: "정자동", style: .plain, target: nil, action: nil)
            //let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = [feedItem, searchItem]
            navigationItem.backButtonDisplayMode = .minimal
            
        case is MyTownViewController:
            let titleConfig = CustomBarItemConfiguration(
                title: "정자동",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            let feedConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "bell"),
                handler: { print("--> feed tapped") })
            let feedItem = UIBarButtonItem.generate(with: feedConfig, width: 30)
            
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = [feedItem]
            navigationItem.backButtonDisplayMode = .minimal
            
        case is ChatViewController:
            let titleConfig = CustomBarItemConfiguration(
                title: "채팅",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            let feedConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "bell"),
                handler: { print("--> feed tapped") })
            let feedItem = UIBarButtonItem.generate(with: feedConfig, width: 30)
            
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = [feedItem]
            navigationItem.backButtonDisplayMode = .minimal
            
        case is MyProfileViewController:
            let titleConfig = CustomBarItemConfiguration(
                title: "나의 당근",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            let settingConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "magnifyingglass"),
                handler: { print("--> setting tapped") })
            
            let settingItem = UIBarButtonItem.generate(with: settingConfig, width: 30)
            
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = [settingItem]
            navigationItem.backButtonDisplayMode = .minimal
            
        default:
            let titleConfig = CustomBarItemConfiguration(
                title: "정자동",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            //let titleItem = UIBarButtonItem(title: "정자동", style: .plain, target: nil, action: nil)
            //let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = []
            navigationItem.backButtonDisplayMode = .minimal
        }
    }
}

// 2. 각 탭에 맞게 네비게이션바 아이템 구성하기
// - 홈: 타이틀, 피드, 서치
// - 동네활동: 타이틀, 피드
// - 내 근처: 타이틀
// - 채팅: 타이틀, 피드
// - 나의 당근: 타이틀, 설정

extension MainTabBarController: UITabBarControllerDelegate {
    func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
        print("--> 어떤 vc가 선택:\(viewController)")
        
        updateNavigaitionItem(vc: viewController)
    }
}

변경사항

1) default display mode 및 FrameworkListViewController

2) 하단 extension의 print문은 주석 처리

        case is FrameworkListViewController:
            navigationItem.largeTitleDisplayMode = .always
            navigationItem.title = "애플"
            navigationItem.leftBarButtonItem = nil
            navigationItem.rightBarButtonItems = nil
            navigationItem.backButtonDisplayMode = .minimal
            
        default:
            navigationItem.largeTitleDisplayMode = .always
            navigationItem.title = nil
            navigationItem.leftBarButtonItem = nil
            navigationItem.rightBarButtonItems = nil
            navigationItem.backButtonDisplayMode = .minimal
        }

Cannot find type 'FrameworkListViewController' in scope

참고: 9주차 > Part8. 실전 프로젝트_Ch02. 당근 홈탭 리스트 따라해보기(Carrot Home) (1) > 07. 프로젝트 당근 홈탭 리스트 따라하기 (홈 구성하기) 07 (07:40~08:45)

Editor > Refactor to Storyboard... 클릭하여 AppleFramework.storyboard 생성 등

해결되지 않음

 

폴더를 복사 붙여넣기할 때, Create groups, Copy items if needed 체크 

다음과 같이 채팅 부분의 아이콘이 사라지며, 다음과 같은 소스 오류 코드 생성

Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

→ 해당 View를 스토리보드 Connection Inpsector에서 ViewController에 연결해주지 않아서 발생

 

다섯번째 탭도 동일하게 설정

 

 

728x90
728x90
728x90
반응형

[Review] (8주차) 실습

2022.08.26 - [Development/Swift] - [Swift] iOS 앱 개발(Xcode) Byte Degree - week.08

 

[Swift] iOS 앱 개발(Xcode) Byte Degree - week.08

[Review] (7주차) 실습 2022.08.25 - [Development/Swift] - [Swift] iOS 앱 개발(Xcode) Byte Degree - week.07 [Swift] iOS 앱 개발(Xcode) Byte Degree - week.07 [Review] (6주차) 실습 2022.07.22 - [Develop..

sarahee.tistory.com


지금까지 구현한 내용

1) 각 탭 구성

2) 탭 별 다른 내비게이션 아이템 설정

3) Home의 Search, Feed, List 등 모두 구성

4) 서버로부터 받은 내용으로 List 구현

앞으로 구현할 내용

Detail view 구성


DetailViewModel.swift 및 ItemInfoDetails.swift 생성

 

HomeViewController에서 viewModel 설정

vc.viewModel = DetailViewModel(network: NetworkService(configuration: .default), itemInfo: item)
collectionView.delegate = self

extension HomeViewController: UICollectionViewDelegate {
    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        let item = viewModel.items[indexPath.item]
        viewModel.itemTapped.send(item)
    }
}

디자인 라벨 등 구성(완료)

코드 수정 방법

option key를 누르고, 커서 드래그 이후 좌우 방향키 이용하여 사용하지 않는 코드 삭제(혹은 생성 가능)

    // User
    @IBOutlet weak var userThumbnail: UIImageView!
    @IBOutlet weak var userNickName: UILabel!
    @IBOutlet weak var userLocation: UILabel!
    @IBOutlet weak var userTemperature: UILabel!
    
    // Item
    @IBOutlet weak var itemThumbnail: UIImageView!
    @IBOutlet weak var itemInfoTitle: UILabel!
    @IBOutlet weak var itemInfoDescription: UILabel!

KingFisher import하여 image 적용

상세뷰 우측 상단에 아이콘 삽입

DetailViewController의 viewDidLoad 함수에 configureNavigationBar() 추가

    override func viewDidLoad() {
        super.viewDidLoad()
        configureNavigationBar()
        bind()
        viewModel.fetch()
    }

Editor > Edit All in Scope (control + command + E)

가격 라벨 추가

@IBOutlet weak var itemPriceLabel: UILabel!

self.itemPriceLabel.text = "\(self.formatNumber(details.item.price))원"

extension DetailViewController {
    private func formatNumber(_ price: Int) -> String {
        let formatter = NumberFormatter()
        formatter.numberStyle = .decimal
        let result = formatter.string(from: NSNumber(integerLiteral: price)) ?? ""
        return result
    }

중간에 separate line 추가하여 완료

상세 오류 수정 #1

문제: 내용(Item Info Description)이 두 줄밖에 보이지 않는 현상

해결: Label Lines: 2 → 0 설정

상세 오류 수정 #2

문제: Detail View의 스크롤이 되지 않는 현상

Align Top to: Safe Area Equals: 44 삭제 및 Stack View 확인

Horizontal - Trailing/Leading Space to: Superview

Vertical - Bottom/Top Space to: Superview

설정하여 해결, 첫번째 내비게이션 바 완성

 

728x90
728x90
728x90
반응형

[Review] (7주차) 실습

2022.08.25 - [Development/Swift] - [Swift] iOS 앱 개발(Xcode) Byte Degree - week.07

 

[Swift] iOS 앱 개발(Xcode) Byte Degree - week.07

[Review] (6주차) 실습 2022.07.22 - [Development/Swift] - [Swift] iOS 앱 개발(Xcode) Byte Degree - week.06 [Swift] iOS 앱 개발(Xcode) Byte Degree - week.06 [Review] (5주차) 실습 2022.07.16 - [Dev/Swi..

sarahee.tistory.com


오류 시, Main.storyboard 삭제 후 다시 붙여넣기

Home UI 설정하기

Editor > Refactor to Storyboard... - Home

command + N > Swift - HomeViewModel

 

홈의 텍스트 및 버튼 삭제

Home 구성

Cocoa Touch Class 생성(Class: ItemInfoCell, Subclass of: UICollectionViewCell)

//
//  HomeViewController.swift
//  CarrotHomeTab
//
//  Created by sehee on 2022/08/24.
//

import UIKit
import Combine

// - 홈의 뷰 모델 만들기(리스트 가져오고, 아이템 탭 했을 때의 행동 정의)
// - 뷰 모델은 리스트 가져오기

class HomeViewController: UIViewController {

    @IBOutlet weak var collectionView: UICollectionView!
    
    let viewModel: HomeViewModel = HomeViewModel(network: NetworkService(configuration: .default))
    var subscriptions = Set<AnyCancellable>()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        configureCollectionView()
        bind()
        viewModel.fetch()
    }
    
    private func configureCollectionView() {
        
    }
    
    private func bind() {
        viewModel.$items
            .receive(on: RunLoop.main)
            .sink { items in
                //self.applyItems(items)
                print("--> update collection view \(items)")
            }.store(in: &subscriptions)
        
        viewModel.itemTapped
            .sink { item in
                let sb = UIStoryboard(name: "Detail", bundle: nil)
                let vc = sb.instantiateViewController(withIdentifier: "DetailViewController") as! DetailViewController
                //vc.viewModel = DetailViewModel(network: NetworkService(configuration: .default), itemInfo: item)
                self.navigationController?.pushViewController(vc, animated: true)
            }.store(in: &subscriptions)
    }
}

Snapshot 설정하여 내부 페이지 확인

오류 수정 #1

Thread 1: "[<CarrotHomeTab.ItemInfoCell 0x7fd8d7846620> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key descriptionLable."

→ Xcode 내 코드에 연결시킨 button을 찾을 수 없음

뷰 내의 인스펙터가 연결 코드 정보와 상이하여 발생(연결 이후 라벨을 변경한 경우, Lable → Label)

ItemInfoCell 내 연결정보 변경

class ItemInfoCell: UICollectionViewCell {
    
    @IBOutlet weak var thumbnail: UIImageView!
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var descriptionLabel: UILabel!
    @IBOutlet weak var priceLabel: UILabel!
    @IBOutlet weak var numOfChatLabel: UILabel!
    @IBOutlet weak var numOfLikeLabel: UILabel!

그래도 불가...

Referencing Outlets 해당 부분을 x

오류 수정 #2

Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

→ 1번과 동일한 문제

반복하여 연결 코드 삭제 후 재입력

해결

 

// - 좌우 패딩 필요

// - 셀에서, 콤마 표시하게끔 넘버 포매팅

// - 셀에서, 이미지 세팅하기 (+ cornerRadius 설정)

// - 셀에서, 콤마 표시하게끔 넘버 포매팅, formatNumber 변경
	func configure(item: ItemInfo) {
        titleLabel.text = item.title
        descriptionLabel.text = item.location
        priceLabel.text = "\(formatNumber(item.price))원"
        
        numOfChatLabel.text = "\(item.numOfChats)"
        numOfLikeLabel.text = "\(item.numOfLikes)"
    }

    private func formatNumber(_ price: Int) -> String {
        let formatter = NumberFormatter()
        formatter.numberStyle = .decimal
//        formatter.numberStyle = .currencyPlural
//        formatter.locale = Locale(identifier: "ko-KR")
        let result = formatter.string(from: NSNumber(integerLiteral: price)) ?? ""
        return result
    }

 

Kingfisher download

Kingfisher: 원격 저장소,  쉽게 말해서 고유의 URL 주소를 가지고 있는 이미지를 앱 내에서 보여지게 해주는 라이브러리

project에서 CarrotHomeTab 선택, 상단바 Package Dependencies 선택, + 버튼 눌러서 Searching All Sources

혹은 File > Add Packages...

패키지 파일 존재하지 않음, 별도 다운로드 필요

 

File > Swift Packages > Add Package Dependency
Add https://github.com/onevcat/Kingfisher.git
Select "Up to Next Major" with "7.0.0"

 

https://github.com/wwood/kingfisher-download

 

GitHub - wwood/kingfisher-download: Easier download/extract of FASTA/Q read data and metadata from the ENA, NCBI, AWS or GCP.

Easier download/extract of FASTA/Q read data and metadata from the ENA, NCBI, AWS or GCP. - GitHub - wwood/kingfisher-download: Easier download/extract of FASTA/Q read data and metadata from the EN...

github.com

git clone https://github.com/wwood/kingfisher-download
cd kingfisher-download
conda env create -n kingfisher -f kingfisher.yml
conda activate kingfisher
cd bin
export PATH=$PWD:$PATH
kingfisher -h

Swift 내장 패키지 파일이 아니므로 Add Local... 불가

해당 URL 입력하여 download

https://github.com/wwood/kingfisher-download

다시 설치

https://github.com/onevcat/Kingfisher

 

GitHub - onevcat/Kingfisher: A lightweight, pure-Swift library for downloading and caching images from the web.

A lightweight, pure-Swift library for downloading and caching images from the web. - GitHub - onevcat/Kingfisher: A lightweight, pure-Swift library for downloading and caching images from the web.

github.com

Dependency Rule: Up to Next Major Version

import Kingfisher

        thumbnail.kf.setImage(
            with: URL(string: item.thumbnailURL),
            placeholder: UIImage(systemName: "hands.sparkles.fill")
        )

다음과 같이 생성(완료)


Storyboard에서 바로 깨어난 시점에서, 이미지의 모서리를 둥글게 설정

    override func awakeFromNib() {
        super.awakeFromNib()
        thumbnail.layer.cornerRadius = 10
        thumbnail.layer.masksToBounds = true
        thumbnail.tintColor = .systemGray
    }

잘못된 URL(이미지가 있는 서버 URL이 아닌)를 선택했을 때, place holder가 보여야 함

        thumbnail.kf.setImage(
//            with: URL(string: item.thumbnailURL),
            with: URL(string: ""),
            placeholder: UIImage(systemName: "hands.sparkles.fill")
        )

 

 

728x90
728x90
728x90
반응형

[Review] (6주차) 실습

2022.07.22 - [Development/Swift] - [Swift] iOS 앱 개발(Xcode) Byte Degree - week.06

 

[Swift] iOS 앱 개발(Xcode) Byte Degree - week.06

[Review] (5주차) 실습 2022.07.16 - [Dev/Swift] - [Xcode] iOS Swift 앱 개발 Byte Degree - week.05 [Xcode] iOS Swift 앱 개발 Byte Degree - week.05 [Review] (4주차) 실습 2022.07.10 - [Dev/Swift] - [Xco..

sarahee.tistory.com


당근 페이지(CarrotHomeTab)

Class: HomeViewController, DetailViewController 구성 (Subclass: UIViewController)

Main의 View Controller에서 상단바 Editor > Embed In > Navigation Controller / Tab Bar Controller 클릭

Class: MainNavigationViewController(UINavigationController), MainTabBarController(UITabBarController)

이후 Class 연결

DetailViewController의 Storyboard는 별도로 생성

    @IBAction func ctaButtonTapped(_ sender: Any) {
        let sb = UIStoryboard(name: "Detail", bundle: nil)
        let vc = sb.instantiateViewController(withIdentifier: "DetailViewController") as! DetailViewController
        navigationController?.pushViewController(vc, animated: true)
    }

실행했을 때 다음과 같은 에러 발생

Main의 entry point 설정

우측 Is Initial View Controller 체크 및 좌측 시작 화살표 확인

다시 실행하면 다음과 같이 UI 생성

Navigation Bar 조절 및 하단 이미지 등 UI 변경

홈: HomeViewController

동네 생활: MyTownViewController 생성 및 연결

내 근처 (설정하지 않음)

채팅: ChatViewController 생성 및 연결

나의 당근: MyProfileViewController 생성 및 연결

 

추가 구성

탭이 눌릴 때마다, 그에 맞는 네비게이션 바를 구성하고자 함
- 탭이 눌리는 것을 감지
- 감지 후에, 그 탭에 맞게 네비게이션 바 구성 업데이트 필요

import UIKit

class MainTabBarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()

        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "hello", style: .plain, target: nil, action: nil)
        navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
        
        delegate = self
    }
}

extension MainTabBarController: UITabBarControllerDelegate {
    func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
        print("--> 어떤 vc가 선택:\(viewController)")
        
        switch viewController {
        case is HomeViewController:
            let titleItem = UIBarButtonItem(title: "정자동", style: .plain, target: nil, action: nil)
            let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItem = feedItem
            
        case is MyTownViewController:
            let titleItem = UIBarButtonItem(title: "정자동", style: .plain, target: nil, action: nil)
            let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItem = feedItem
            
        case is ChatViewController:
            let titleItem = UIBarButtonItem(title: "채팅", style: .plain, target: nil, action: nil)
            let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItem = feedItem
            
        case is MyProfileViewController:
            let titleItem = UIBarButtonItem(title: "나의 당근", style: .plain, target: nil, action: nil)
            let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItem = feedItem
            
        default:
            let titleItem = UIBarButtonItem(title: "당근 당근", style: .plain, target: nil, action: nil)
            let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItem = feedItem
        }
    }
}

CustomBarItem 생성

MainTabBar 구성 변경하여 좌측 상단 text UI 설정


우측 상단 Item 개수 조절

MainTabBarController, delegate = self 하단에...

// 각 탭에 맞게 네비게이션바 아이템 구성하기
// - 홈: 타이틀, 피드, 서치
// - 동네활동: 타이틀, 피드
// - 내 근처: 타이틀
// - 채팅: 타이틀, 피드
// - 나의 당근: 타이틀, 설정

let searchConfig = CustomBarItemConfiguration(image: UIImage(systemName: "magnifyingglass"), handler: { print("--> search tapped") })
let searchView = CustomBarItem(config: searchConfig)
let searchItem = UIBarButtonItem(customView: searchView)

let feedConfig = CustomBarItemConfiguration(image: UIImage(systemName: "bell"), handler: { print("--> feed tapped") })
let feedView = CustomBarItem(config: feedConfig)
let feedItem = UIBarButtonItem(customView: feedView)

하단 let feedItem 삭제 및 수정

navigationItem.leftBarButtonItem = titleItem
navigationItem.rightBarButtonItems = [feedItem, searchItem]

 

실행하여 search 확인

            let searchConfig = CustomBarItemConfiguration(image: UIImage(systemName: "magnifyingglass"), handler: { print("--> search tapped") })
            let searchView = CustomBarItem(config: searchConfig)
            NSLayoutConstraint.activate([
                searchView.widthAnchor.constraint(equalToConstant: 30)
            ])
            
            let searchItem = UIBarButtonItem(customView: searchView)
            
            let feedConfig = CustomBarItemConfiguration(image: UIImage(systemName: "bell"), handler: { print("--> feed tapped") })
            let feedView = CustomBarItem(config: feedConfig)
            NSLayoutConstraint.activate([
                feedView.widthAnchor.constraint(equalToConstant: 30)
            ])
            
            let feedItem = UIBarButtonItem(customView: feedView)

UIBarButtonItem+CustomView 생성(command + N)

//
//  MainTabBarController.swift
//  CarrotHomeTab
//
//  Created by sehee on 2022/08/24.
//

import UIKit

// 1. 탭이 눌릴 때마다, 그에 맞는 네비게이션 바를 구성하고자 함
// - 탭이 눌리는 것을 감지
// - 감지 후에, 그 탭에 맞게 네비게이션 바 구성 업데이트 필요


// 3. 앱이 시작할 때, 네비게이션바 아이템 설정을 완료하고 싶음
// - 네비게이션 바를

class MainTabBarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        delegate = self
    }
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        updateNavigaitionItem(vc: self.selectedViewController!)
        //self.selectedIndex
        //self.selectedViewController
    }
    
    private func updateNavigaitionItem(vc: UIViewController) {
        switch vc {
        case is HomeViewController:
            let titleConfig = CustomBarItemConfiguration(
                title: "정자동",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            let searchConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "magnifyingglass"),
                handler: { print("--> search tapped") })
            
            let searchItem = UIBarButtonItem.generate(with: searchConfig, width: 30)
            
            let feedConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "bell"),
                handler: { print("--> feed tapped") })
            let feedItem = UIBarButtonItem.generate(with: feedConfig, width: 30)
            
            //let titleItem = UIBarButtonItem(title: "정자동", style: .plain, target: nil, action: nil)
            //let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = [feedItem, searchItem]
            navigationItem.backButtonDisplayMode = .minimal
            
        case is MyTownViewController:
            let titleConfig = CustomBarItemConfiguration(
                title: "정자동",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            let feedConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "bell"),
                handler: { print("--> feed tapped") })
            let feedItem = UIBarButtonItem.generate(with: feedConfig, width: 30)
            
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = [feedItem]
            navigationItem.backButtonDisplayMode = .minimal
            
        case is ChatViewController:
            let titleConfig = CustomBarItemConfiguration(
                title: "채팅",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            let feedConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "bell"),
                handler: { print("--> feed tapped") })
            let feedItem = UIBarButtonItem.generate(with: feedConfig, width: 30)
            
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = [feedItem]
            navigationItem.backButtonDisplayMode = .minimal
            
        case is MyProfileViewController:
            let titleConfig = CustomBarItemConfiguration(
                title: "나의 당근",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            let settingConfig = CustomBarItemConfiguration(
                image: UIImage(systemName: "magnifyingglass"),
                handler: { print("--> setting tapped") })
            
            let settingItem = UIBarButtonItem.generate(with: settingConfig, width: 30)
            
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = [settingItem]
            navigationItem.backButtonDisplayMode = .minimal
            
        default:
            let titleConfig = CustomBarItemConfiguration(
                title: "정자동",
                handler: { })
            
            let titleItem = UIBarButtonItem.generate(with: titleConfig)
            
            //let titleItem = UIBarButtonItem(title: "정자동", style: .plain, target: nil, action: nil)
            //let feedItem = UIBarButtonItem(barButtonSystemItem: .bookmarks, target: nil, action: nil)
            navigationItem.leftBarButtonItem = titleItem
            navigationItem.rightBarButtonItems = []
            navigationItem.backButtonDisplayMode = .minimal
        }
    }
}

// 2. 각 탭에 맞게 네비게이션바 아이템 구성하기
// - 홈: 타이틀, 피드, 서치
// - 동네활동: 타이틀, 피드
// - 내 근처: 타이틀
// - 채팅: 타이틀, 피드
// - 나의 당근: 타이틀, 설정

extension MainTabBarController: UITabBarControllerDelegate {
    func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
        print("--> 어떤 vc가 선택:\(viewController)")
        
        updateNavigaitionItem(vc: viewController)
    }
}

내비게이션 바 UI 설정

//
//  MainNavigationViewController.swift
//  CarrotHomeTab
//
//  Created by sehee on 2022/08/24.
//

import UIKit

class MainNavigationViewController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        let backImage = UIImage(systemName: "arrow.backward")
        navigationBar.backIndicatorImage = backImage
        navigationBar.backIndicatorTransitionMaskImage = backImage
        navigationBar.tintColor = .white
    }
}

 

 

728x90
728x90
728x90
반응형
목차
0. Ransomware 파일 내부
  1) file 정보

  2) readme.txt 파일
  3) run.exe 파일
1. run.exe 파일 실행
  1) Exeinfo.exe 설치
  2) HxD 설치
  3) UPX 설치
  4) OllyDbg 설치
  5) WOW64 설치
2. IDA run.exe 파일 분석
3. OllyDbg run.exe 파일 분석
4. Key값 구하기
5. 소스코드 정리 및 연산 수행
6. 최종 실행 및 Flag 확인

[Review] (5주차) 실습

2022.08.06 - [Security & Analysis/IDA Pro] - [IDA Pro] 악성코드 정적분석 툴 사용법&이론 - week.05(Easy ELF)

 

[IDA Pro] 악성코드 정적분석 툴 사용법&이론 - week.05(Easy ELF)

목차 1. Easy ELF 실습 - 실습을 위한 사전 단계(Linux 파일 실행) 2. 분기문 분석 3. byte 및 배열 정리 4. 소스코드 작성(어셈블리어 기반) [Review] (4주차) 이론 - 총정리 2022.07.19 - [Security & Analysis/..

sarahee.tistory.com


0. Ransomware 파일 내부

랜섬웨어 암호화 file 및 txt, exe 파일

zip 파일의 압축을 풀면 다음과 같이 file 및 txt, exe 총 3개의 파일 생성

file에 파일 확장자가 없기 때문에 바이너리 형식으로 암호화되었다고 판단

따라서 16진 편집기인 HxD 사용 예정

1) file 정보

2) readme.txt 파일

file 확장자가 exe

ui 파일을 .py로 변경(Pyutic)

3) run.exe 파일


1. run.exe 파일 실행

IAT: Import Address Table, 프로그램이 어떤 라이브러리에서 어떤 함수를 쓰는지 기술한 테이블

프로그램이 특정 API를 실행하고자 할 때 IAT를 불러옴

압축되어 있어서 확인 불가

해당 파일이 압축되어 있어서, 내부 정보 확인이 불가

1) Exeinfo PE 파일 다운로드하여 정보 확인

https://exeinfo-pe.kr.uptodown.com/windows

 

Exeinfo PE (Windows)

Exeinfo PE을 위한 Windows을 무료로 다운로드하세요. .exe 파일 확인하기. Exeinfo PE는 여러분이 .exe 파일들을 확인하여 그 속성을 살펴볼 수 있는 프로그램입니다. 또한, 해당 파일의 이름을 변경하고

exeinfo-pe.kr.uptodown.com

파일이 UPX로 패킹되어 있음

(언패킹된 프로그램을 출력 시 컴파일된 언어 등 조회 가능)

2) HxD 설치

Window 용 16진 편집기, 디스크/메모리 편집기, 프로세스 실행에 사용되는 메모리를 표시하고 편집할 수 있음

https://mh-nexus.de/en/downloads.php?product=HxD20 

3) UPX 설치

하단 Unpack info

Big sec. 2 [ UPX1 ] , unpack "upx.exe -d"  from  http://upx.github.io or any UPX/Generic unpacker

해당 사이트에 접속하여 설치 진행

UPX란?

the Ultimate Packer for eXecutables, 오픈 소스 실행 파일 압축 프로그램

Download latest release > upx-3.96-win64.zip
다운로드 받은 upx.exe 파일을 unpacking하고자 하는 exe 파일에 위치

upx.exe -d run.exe

Not packed, 내부 정보 확인 가능

4) OllyDbg 설치

https://www.ollydbg.de/download.htm

5) WOW64 설치

운영체제의 하위 시스템, 32비트 윈도우와 64비트 윈도우의 차이 보완

모든 64비트 버전의 마이크로소프트 윈도우에서 32비트 응용 프로그램들이 돌아가도록 도와줌

https://ko.dll-files.com/wow64.dll.html

zip 파일 압축 해제 후, regsvr32 wow64.dll


2. IDA run.exe 파일 분석

cmd 명령어에서 확인한 Key 문자열 검색하여 알고리즘 확인

Key의 입력값이 byte_44D370에 저장

call [접근할 함수 주소]

file 문자열 확인

StartAddress Functions 내부 file open

함수 시작 부분에 코드 반복 ← 파일 크기 키우고, 분석에 어려움을 주기 위함

 

rb는 file을 읽는 형식

read binary, 즉 바이너리 형식으로 파일을 읽겠다는 의미

 

좌측 printf: '파일을 찾을수 없다!' 문자열 출력 구문

 

하단 Stream

* Stream: 컴퓨터 처리 환경에서, 시간이 지남에 따라 사용할 수 있게 되는 일련의 데이터 요소

fseek: fopen으로 호출된 파일의 위치 변경

ftell: 스트림 위치 지정자의 현재 위치(파일 포인터)

feof: stream(FILE)의 파일 끝 플래그가 설정되었는지 여부 표시, 파일의 끝 위치 확인

fgetc: 파일에서 글자를 하나씩 읽는 함수

→ feof를 이용해 파일의 끝에 도달할 때까지 fgetc 함수를 통해 1byte씩 file 파일로부터 읽어들임

wb, binary 형식으로 file을 쓰겠다는 의미

  • 좌측 하단 printf: '파일을 복구했다! ~' 문자열 출력
  • 우측에 핵심 부분으로 복호화를 수행하는 loop 존재

알고리즘 loop

1) xor edx, edx - ebp+Stream 등.. 의미 없음(모두 0이 되므로, 초기화하는 과정)

2) div [ebp+var_C] - 입력한 key가 DIV 연산에 의해 끝 byte에 도달했을 때, 처음 byte로 돌아감

3) xor ecx, edx - input으로 입력한 key 중 한 byte와 XOR 연산 수행(ecx: 입력값(반복 카운터), edx: key값)

4) xor edx, 0FFh - 위의 결과와 0xFF XOR 연산 수행

 

XOR 연산의 성질에 의해, Key를 찾기 위해 file 파일과 0xFF를 XOR

Original File을 바이트 단위로 XOR

Original File은? readme.exe 파일의 hint에 의해 복호화된 파일은 exe 파일(PE구조)이라는 것을 판단

 


3. OllyDbg run.exe 파일 분석

run.exe file open


4. Key값 구하기

file이 exe 포맷이므로, header 구조는 다른 exe 파일과 동일할 것

upx.exe, run.exe

00000000 ~ 00000070까지 대부분 동일한 헤더값을 가지며,(00000030의 F0, 80 차이)

키 값을 모르기 때문에 0x20 크기 복호화

  • 복호화 되어야 할 값:
  • 4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00 B8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00
B8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 F0 00 00 00
0E 1F BA 0E 00 B4 09 CD 21 B8 01 4C CD 21 54 68
69 73 20 70 72 6F 67 72 61 6D 20 63 61 6E 6E 6F
74 20 62 65 20 72 75 6E 20 69 6E 20 44 4F 53 20
6D 6F 64 65 2E 0D 0D 0A 24 00 00 00 00 00 00 00

 

file

  • 암호화된 값: 
  • DE C0 1B 8C 8C 93 9E 86 98 97 9A 8C 73 6C 9A 8B 34 8F 93 9E 86 9C 97 9A CC 8C 93 9A 8B 8C 8F 93
DE C0 1B 8C 8C 93 9E 86 98 97 9A 8C 73 6C 9A 8B
34 8F 93 9E 86 9C 97 9A CC 8C 93 9A 8B 8C 8F 93
9E 86 9C 97 9A 8C 8C 93 9A 8B 8C 8F 93 9E 86 9C
97 9A 8C 8C 93 9A 8B 8C 8F 93 9E 86 6C 97 9A 8C
82 8C 20 85 8C 3B 9A 53 A7 24 96 D6 41 AD C7 F2
E2 FF AF E3 EC E9 FB E5 FB E1 AC F0 FB E5 E2 E0
E7 BE E4 F9 B7 E8 F9 E2 B3 F3 E5 AC CB DC CD A6
F1 F8 FE E9 A2 9E 97 81 A8 8F 93 9E 86 9C 97 9A

5. 소스 코드 정리 및 연산 수행

해당 파일이 최종 구현된 소스코드

key = input('Key : ').encode()

f = open('./ransomware/file', 'rb')
enc_content = f.read()
f.close()

dec_content = []
for i in range(len(enc_content)):
    dec_content.append(enc_content[i] ^ key[i % len(key)] ^ 0xFF)
dec_content = bytes(dec_content)

f = open('file', 'wb')
f.write(dec_content)
f.close()

 

de_file[i] = en_file[i] ^ key[i] ^ 0xFF → key[i] = en_file[i] ^ de_file[i] ^ 0xFF

원본 데이터가 반복이라면, key 값만 달라지기 때문에 key의 길이만큼 동일 데이터가 반복될 것

 

# sol1

# 20 bytes
# 암호화된 값 : DE C0 1B 8C 8C 93 9E 86 98 97 9A 8C 73 6C 9A 8B 34 8F 93 9E 86 9C 97 9A CC 8C 93 9A 8B 8C 8F 93
# 복호화 되어야 할 값: 4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00 B8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00

enc_content = [0xDE, 0xC0, 0x1B, 0x8C, 0x8C, 0x93, 0x9E, 0x86, 0x98, 0x97, 0x9A, 0x8C, 0x73, 0x6C, 0x9A, 0x8B, 0x34, 0x8F, 0x93, 0x9E, 0x86, 0x9C, 0x97, 0x9A, 0xCC, 0x8C, 0x93, 0x9A, 0x8B, 0x8C, 0x8F, 0x93]
dec_content = [0x4D, 0x5A, 0x90, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]

key = ''
for i in range(len(enc_content)):
    key += chr(dec_content[i] ^ enc_content[i] ^ 0xFF)
print(key)

# sol2

enc_content = "DE C0 1B 8C 8C 93 9E 86 98 97 9A 8C 73 6C 9A 8B 34 8F 93 9E 86 9C 97 9A CC 8C 93 9A 8B 8C 8F 93".split(' ')
dec_content = "4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00 B8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00".split(' ')

for i in range(len(enc_content)):
    enc_content[i] = int(enc_content[i], 16)
    dec_content[i] = int(dec_content[i], 16)
    enc_content[i] = enc_content[i] ^ 0xFF
    enc_content[i] = enc_content[i] ^ dec_content[i]
    print(chr(enc_content[i]), end="")

결과값: letsplaychess 반복


6. 최종 실행 및 Flag 확인

기존의 file을 확장자 변경(exe) 후 실행하면, 다음과 같이 실행 불가

run.exe 파일 실행 후 결과값(Key : letplaychess) 입력

 

 

728x90
728x90
728x90
반응형
목차
1. 온라인 수학·과학 가상실험실(VlabON) 개관 (220815)
2. 디지털 안전 융합으로 일터·생활·재난 안전 등 국민안전 3대분야 사각지대를 해소한다 (220817)
3. 보안 규제개선으로 혁신적 신기술 서비스 공공도입 촉진 (220818)
4. 디지털 시대의 주인공이 될 100만 인재를 양성합니다. (220819)
5. 경제안보 시대, 우리기술 유출방지 대책 마련 (220819)
6. 개인정보보호 중심 설계(Privacy by Design) 인증제도 동향 및 국내 도입 방안 검토 (220817)

1. 온라인 수학·과학 가상실험실(VlabON) 개관 (220815)

(출처: 과학기술정보통신부, 보도자료, 미래인재양성과 책임자 강호원 과장(044-202-4830), 담당자 이현우 사무관(044-202-4832))

  • 웹(Web) 기반의 삼차원 시뮬레이션 가상실험실 구축
  • 올해는 기·대학 연구소 등에서 폭넓게 활용되는 에디슨(EDISON*) 시뮬레이션 소프트웨어와 연계

* EDISON(EDucation-research Integration through Simulation On the Net): 이공계 전문 응용 분야의 교육·연구를 위해 온라인 환경에서 시뮬레이션 가능한 SW 등을 활용할 수 있는 플랫폼

<자료> 과학기술정보통신부, 온라인 수학·과학 가상실험실(VlabON) 접근·구성 화면


2. 디지털 안전 융합으로 일터·생활·재난 안전 등 국민안전 3대분야 사각지대를 해소한다 (220817)

(출처: 과학기술정보통신부, 보도자료, 네트워크안전기획과 책임자 구본준 과장(044-202-6430), 담당자 송창종 사무관(044-202-6431))

사각지대 없는 생활 속 디지털 안전망 구현

  • 기지국, 와이파이(WiFi), 블루투스 등 다양한 신호를 활용한 '실내정밀측위 구축, 고도화' 추진
  • 1단계: 와이파이(WiFi) 및 초광대역무선기술(UWB) 신호탐지기를 통해 경찰・소방 현장 수색능력을 강화

<자료> 과학기술정보통신부, AI기반 실내복합측위 기술 개념도


3. 보안 규제개선으로 혁신적 신기술 서비스 공공도입 촉진 (220818)

(출처: 과학기술정보통신부, 보도자료, 정보보호네트워크정책관 정보보호산업과 책임자 정은수 과장(044-202-6450), 담당자 곽을경 사무관(044-202-6453))

주요 내용

  • (위성정보) 국가 위성정보 해상도 규제 완화(4m→1.5m) 등으로 위성정보 활용 산업 활성화
  • (클라우드 보안) 보안인증을 3등급으로 구분, 등급별 차등화된 보안기준 적용
  • (정보보호제품 인증) 신속확인제 도입으로 신기술 제품을 2~3개월 내 도입 가능
  • (무선영상 전송) 공공기관용 무선영상전송장비 시험인증 서비스 개시

클라우드 보안인증제도 개선

  • 등급제 도입 및 평가기준 완화

등급제 도입

  • 기존의 획일적 보안인증 체계에서 클라우드로 사용될 시스템의 중요도 기준으로 3등급 구분
  • 등급별로 차등화된 보안인증기준을 적용하여 사이버 안보가 저해되지 않도록 도입

평가기준 완화

  • 민감정보 등을 다루는 클라우드에 대해서는 보안성을 높임
  • (보안 위험이 상대적으로 낮은) 공개데이터를 다루는 클라우드에 대해 부담을 완화

4. 디지털 시대의 주인공이 될 100만 인재를 양성합니다. (220819)

(출처: 과학기술정보통신부, 보도자료, 소프트웨어정책과 정준욱 사무관(044-202-6321) 외 9인)

  • 디지털 인재: 디지털 신기술을 개발‧활용‧운용하는 데 필요한 지식과 역량을 갖춘 인재
  • 디지털 신기술: 인공지능, 일반 SW(블록체인 포함), 빅데이터, 메타버스(AR, VR 포함), 클라우드, 사물

100만 디지털 인재양성을 위한 주요 정책

"100만"은 전문 인재 양성뿐만 아니라 전 국민이 삶과 전공 분야에서 디지털 기술을 자유롭게 적용할 수 있도록 지원한다는 상징적 목표이면서 동시에 향후 5년간(2022~2026)의 인재양성 목표

1) 고도화된 디지털 전문인재

  •  (선도대학디지털 혁신공유대학(~2026. 21개 분야 목표)‘소프트웨어(SW)중심대학’ (2027. 100개교 목표), ‘신산업특화 전문대학’(~2026. 21개 분야 목표)
  • 사업을 확대해 디지털 선도대학을 육성하고 디지털 첨단분야 전공자를 지속해서 확대할 계획

2) 전공(도메인) 분야에 디지털 기술을 적용하는 인재

  • (융합과정인문‧사회 등 다양한 전공과 디지털 기술의 융합역량 향상 지원을 위해 대학-민간 연계 집중 연계 교육과정(부트캠프) 도입(2023~)
  • 융복합 능력 배양학사제도 유연화를 위한 대학 혁신을 지원

3) 일상에서 디지털 기술을 활용하는 인재

  • (대학 수준의 디지털 교양과정대학혁신지원사업을 통해 대학의 자율적인 디지털 혁신(교양교육인공지능(AI)튜터링 등)을 지원
  • 한국형 온라인 공개강좌(K-MOOC) 내 디지털 등 신기술 분야 강좌를 제공(2022. 138)

5. 경제안보 시대, 우리기술 유출방지 대책 마련 (220819)

(출처: 특허청, 보도자료, 산업재산보호협력국 산업재산보호정책과 책임자 김일규 과장(042-481-5213), 담당자 류정현 사무관(042-481-5070))

  • (예방) 반도체 등 핵심산업에 대해 기술유출 방지 집중지원
  • (대응) 기술유출에 신속・효율적 대응을 위한 부처협업 강화
  • (기반) 일벌백계를 통한 재발방지를 위해 법적기반 마련

최근 미・중 패권경쟁, 우크라이나 사태 등으로 인해 반도체 등 핵심 기술은 반드시 필요한 전략자산으로 대두됨

기술을 확보하기 위한 각국의 경쟁이 치열해지면서, 단기간 내 기술격차를 줄이기 위한 방법으로 영업비밀 유출 시도 증가(e.g. 핵심인력 빼가기, 산업스파이, 사이버해킹)

특허청은 핵심적인 기술정보인 영업비밀을 보호하기 위한 종합대책으로 3대 전략, 9개 과제 수립

  • [전략 1] 영업비밀 유출 방지를 위해 사전예방 강화
  • [전략 2] 영업비밀 유출에 대한 전방위적 대응역량 제고
  • [전략 3] 새로운 환경변화에 대응하여 영업비밀 보호기반 구축
  • [부정경쟁방지] 공정한 겅쟁질서 확립을 위해 부정경쟁행위 근절

6. 개인정보보호 중심 설계(Privacy by Design) 인증제도 동향 및 국내 도입 방안 검토 (220817)

(출처: 정보통신기획평가원, 주간기술동향, 한국인터넷진흥원 최혜미 주임연구원(061-820-1947, hmchoi@kisa.or.kr), 오용석 연구위원)

<자료> 개인정보보호위원회ㆍ한국인터넷진흥원, 자동처리 되는 개인정보 보호 가이드라인, 2020. 12.
<자료> ENISA, &ldquo;Privacy and Data Protection by Design&rdquo;, 2014. 12. pp.18-22.

개인정보보호위원회, 한국인터넷진흥원, "자동처리 되는 개인정보 보호 가이드라인", 2020. 12.

 

 

728x90
728x90
728x90
반응형

apk 파일이란?

Android Package Kit, Google의 Android OS에 애플리케이션을 배포하는 데 사용되는 Android 패키지 파일의 확장

Windows OS의 소프트웨어 설치를 위한 exe 파일과 동일한 유형

안드로이드 프로그램 애플리케이션의 모든 데이터 포함

 

Windows에서 APK 파일을 열기 위해서는 Android Studio와 같은 cross platform 개발 환경 필요

text 형식으로 파일을 오픈할 경우
Stay in LightEdit 버튼 클릭
파일이 binary 형식으로 열려 깨짐

APK Analyzer로 빌드 분석 방법

https://developer.android.com/studio/debug/apk-analyzer?hl=ko 

 

APK Analyzer로 빌드 분석  |  Android 개발자  |  Android Developers

Android 스튜디오에는 빌드 프로세스가 완료된 후 APK 구성에 관한 유용한 정보를 즉시 제공하는 APK Analyzer가 포함됩니다.

developer.android.com

 

압축 해제하여 내부 폴더/파일 및 소스 코드 조회

Android.apk folder  
META-INF 서명 및 아카이브의 리소스 목록, 매니페스트 파일 포함
lib 장치의 특정 아키텍처에서 실행되는 기본 라이브러리
res resources.arsc로 컴파일되지 않은 리소스(e.g. image)
assets 번들로 제공하는 리소스의 원시 파일(개발자가 앱과 함께 제공)
r 안드로이드 개요 참조? xml 파일 (http://schemas.android.com/apk/res/android)
Android.apk file  
AndroidManifest.xml APK 파일의 콘텐츠, 버전, 이름에 대한 설명 제공
class.dex 컴파일된 Java 클래스(기기 내 실행)
resources.arsc 앱에서 사용하는 컴파일된 리소스(e.g. 문자열)

 

eyes sources > assets > web > login.html 내 내부 연결 사이트 존재

		<div class="row footer">
			 <div class="sns"><!-- target="_blank"  -->
			 	<a href="http://m.facebook.com/pages/%EA%B3%B5%EC%A6%9D%EC%A0%9C%EB%8F%84%ED%99%8D%EB%B3%B4/455469054516582?ref=hl" class="ic-sns ic-sns-f mr-20" target="_blank"></a>
			 	<a href="http://pf.kakao.com/_GSxeTC" class="ic-sns ic-sns-p mr-20" target="_blank" ></a>
			 	<a href="http://m.blog.naver.com/notary_legal" class="ic-sns ic-sns-n" target="_blank" ></a>
			 </div>

법무부 공식 페이지 URL과 상이하며, 현재 카카오톡 채널은 비공개 혹은 삭제된 프로필로 표시

 

eyes sources > assets > web > end.html 내 코드

기타 버튼을 누를 경우, 법무부 전자공증시스템(공식 홈페이지, enotary.moj.go.kr) 연결

<div class="panel-group" id="menus">
   <div class="panel panel-dafault">
      <div class="panel-heading">
         <h4 class="panel-title">
            <a data-toggle="collapse" data-parent="#menus" href="#menu1">내 신청내역
               <i class="menu-in"></i>
            </a>
         </h4>
      </div>
      <div id="menu1" class="panel-collapse collapse in">
      
         <div class="panel-body text-center">
            <p>로그인을 하시면 편리한 화상공증 서비스를</p>
            <p>이용하실 수 있습니다.</p>
            <a href="https://enotary.moj.go.kr/mobile/login.jsp" class="btn btn-sidebar-login">로그인</a>
         </div>
      
      </div>
   </div>
   <div class="panel panel-dafault">
      <div class="panel-heading">
         <h4 class="panel-title">
            <a data-parent="#menus" href="https://enotary.moj.go.kr/mobile/office_search/office_search.jsp">사무소 찾기
               <i class="menu-out"></i>
            </a>
         </h4>
      </div>
   </div>
   <div class="panel panel-dafault">
      <div class="panel-heading">
         <h4 class="panel-title">
            <a data-toggle="collapse" data-parent="#menus" href="#menu3">공증안내
               <i class="menu-out"></i>
            </a>
         </h4>
      </div>
      <div id="menu3" class="panel-collapse collapse">
         <div class="panel-body">
            <ul>
               <a href="https://enotary.moj.go.kr/mobile/enotary_guide/about.jsp"><li>공증제도</li></a>
               <a href="https://enotary.moj.go.kr/mobile/enotary_guide/law.jsp"><li>공증법령</li></a>
               <a href="https://enotary.moj.go.kr/mobile/enotary_guide/guide.jsp"><li>전자공증안내</li></a>
               <a href="https://enotary.moj.go.kr/mobile/enotary_guide/howtouse.jsp"><li>전자공증이용방법</li></a>
            </ul>
         </div>
      </div>    
   </div>
   <div class="panel panel-dafault">
      <div class="panel-heading">
         <h4 class="panel-title">
            <a data-toggle="collapse" data-parent="#menus" href="#menu4">고객센터
               <i class="menu-out"></i>
            </a>
         </h4>
      </div>
      <div id="menu4" class="panel-collapse collapse">
         <div class="panel-body">
            <ul>
               <a href="https://enotary.moj.go.kr/mobile/customer/notice.jsp"><li>공지사항</li></a>
               <a href="https://enotary.moj.go.kr/mobile/customer/uselist.jsp"><li>전자공증 활용사례</li></a>
               <a href="https://enotary.moj.go.kr/mobile/customer/util.jsp"><li>자료실</li></a>
               <a href="https://enotary.moj.go.kr/mobile/customer/qa.jsp"><li>Q&amp;A</li></a>
               <a href="https://enotary.moj.go.kr/mobile/customer/faq.jsp"><li>FAQ</li></a>
               <a href="https://enotary.moj.go.kr/mobile/customer/documents.jsp"><li>공증사무소 방문 시 지참서류</li></a>
               <a href="javascript:setGongin();" id="gongin"><li>공인인증센터</li></a>
               <script>
                  function setGongin(){
                     location.href = "https://enotary.moj.go.kr/mobile/customer/gongin.jsp"
                  }
               </script>
            </ul>
         </div>
      </div>
   </div>
</div>

프로그램 보안 검사

전체 251개의 앱을 검사하는 과정이며, 내부 악성 앱을 설치하는 요소가 포함되는지 확인

// 2.html file
<body>
  <div class="main" id="app">
    <div class="center-img display-flex flex-align-center flex-justify-center ">
      <img src="./img/ic_launcher_round.png" alt="">
    </div>
    <div class="folder-text fontSize-14 text-center">{{`설치된 ${total}개의 앱중에서 ${num}번째 앱을 검사 중입니다.`}}</div>
    <div class="folder-loop fontSize-12 text-center">
      {{folderText}}
    </div>
  </div>

// ----------

data() {
  return {
    total: 251,
    num: 0,
    folderText: '',
    json: [
      "com.google.omadm.trigger",
      "com.google.android.carriersetup",
      "com.android.cts.priv.ctsshim",
      "com.google.android.youtube",
      "com.vzw.apnlib",
      "com.android.internal.display.cutout.emulation.corner",
      "com.google.android.ext.services",
      "com.android.internal.display.cutout.emulation.double",
      "com.google.android.overlay.pixelconfig2017",
      "com.google.android.overlay.pixelconfig2018",
      "com.android.providers.telephony",
      "com.android.dynsystem",
      "com.android.sdm.plugins.connmo",
      "com.google.android.googlequicksearchbox",
      "com.android.providers.calendar",
      "com.android.providers.media",
      "com.google.android.apps.docs.editors.docs",
      "com.google.android.onetimeinitializer",
      "com.google.android.ext.shared",
      "com.android.internal.systemui.navbar.gestural_wide_back",
      "com.quicinc.cne.CNEService",
      "com.estsoft.alyac",
      "com.android.theme.color.cinnamon",
      "com.google.android.apps.diagnosticstool",
      "com.google.euiccpixel",
      "com.android.theme.icon_pack.rounded.systemui",
      "com.android.simappdialog.auto_generated_rro_product__",
      "com.android.safetyregulatoryinfo.auto_generated_rro_product__",
      "com.android.externalstorage",
      "com.google.android.apps.enterprise.dmagent",
      "com.android.htmlviewer",
      "com.qualcomm.qti.uceShimService",
      "com.android.companiondevicemanager",
      "com.verizon.obdm_permissions",
      "com.android.mms.service",
      "com.android.providers.downloads",
      "com.google.android.cbrsnetworkmonitor",
      "com.android.sdm.plugins.usccdm",
      "com.android.systemui.auto_generated_rro_product__",
      "com.google.android.apps.messaging",
      "com.google.android.soundpicker",
      "com.android.theme.icon_pack.rounded.android",
      "com.breel.wallpapers18",
      "com.qualcomm.qti.telephonyservice",
      "com.android.theme.icon_pack.circular.themepicker",
      "com.google.android.configupdater",
      "com.google.android.overlay.googlewebview",
      "com.google.android.apps.safetyhub",
      "com.android.timezone.updater",
      "com.google.ar.core",
      "com.android.providers.downloads.ui",
      "com.android.vending",
      "com.android.pacprocessor",
      "com.android.simappdialog",
      "com.nuts.extremspeedup",
      "com.android.internal.display.cutout.emulation.tall",
      "com.android.certinstaller",
      "com.android.theme.color.black",
      "com.google.android.marvin.talkback",
      "com.android.theme.color.green",
      "com.android.theme.color.ocean",
      "com.android.theme.color.space",
      "com.android.internal.systemui.navbar.threebutton",
      "com.google.android.apps.work.oobconfig",
      "com.qti.qualcomm.datastatusnotification",
      "com.google.android.pixel.setupwizard",
      "com.android.theme.icon_pack.rounded.launcher",
      "com.google.android.grilservice",
      "com.android.egg",
      "com.android.mtp",
      "com.android.nfc",
      "com.android.ons",
      "com.android.stk",
      "com.android.backupconfirm",
      "com.android.theme.font.arvolato",
      "com.android.systemui.auto_generated_rro_vendor__",
      "com.google.android.deskclock",
      "com.android.internal.systemui.navbar.twobutton",
      "com.android.statementservice",
      "com.android.hotspot2",
      "com.google.android.as",
      "com.google.android.gm",
      "com.google.android.carrier",
      "com.google.android.apps.tachyon",
      "com.android.sdm.plugins.sprintdm",
      "com.android.internal.systemui.navbar.gestural_extra_wide_back",
      "com.google.android.permissioncontroller",
      "com.google.intelligence.sense",
      "com.google.android.setupwizard",
      "com.qualcomm.qcrilmsgtunnel",
      "com.android.providers.settings",
      "com.android.sharedstoragebackup",
      "com.verizon.services",
      "com.android.nfc.auto_generated_rro_product__",
      "com.google.android.euicc",
      "com.google.android.music",
      "com.android.printspooler",
      "com.android.hotwordenrollment.okgoogle",
      "com.android.sdm.plugins.diagmon",
      "com.android.theme.icon_pack.filled.settings",
      "com.android.dreams.basic",
      "com.android.providers.settings.auto_generated_rro_product__",
      "com.android.se",
      "com.android.inputdevices",
      "com.google.android.apps.wellbeing",
      "com.google.android.dialer",
      "com.android.bips",
      "com.google.audio.hearing.visualization.accessibility.scribe",
      "com.google.android.captiveportallogin",
      "com.android.theme.icon_pack.circular.settings",
      "com.google.android.accessibility.soundamplifier",
      "com.qti.xdivert",
      "com.android.musicfx",
      "com.google.android.apps.docs",
      "com.google.android.apps.maps",
      "com.google.android.apps.tips",
      "com.google.android.documentsui.theme.pixel",
      "com.google.android.modulemetadata",
      "com.android.bluetooth.auto_generated_rro_vendor__",
      "com.google.android.markup",
      "com.android.providers.settings.auto_generated_rro_vendor__",
      "com.android.cellbroadcastreceiver",
      "com.google.android.webview",
      "com.android.theme.icon.teardrop",
      "com.google.android.apps.carrier.log",
      "com.google.android.networkstack",
      "com.google.android.contacts",
      "com.android.server.telecom",
      "com.google.android.syncadapters.contacts",
      "com.android.theme.icon_pack.rounded.themepicker",
      "com.android.keychain",
      "com.android.server.tele",
      "com.auto_generated_rro_product__",
      "com.google.android.overlay.googleconfig",
      "com.google.android.calculator",
      "com.android.service.ims",
      "com.android.chrome",
      "com.android.bips.auto_generated_rro_product__",
      "com.android.theme.icon_pack.filled.systemui",
      "com.google.android.packageinstaller",
      "com.google.android.apps.customization.pixel",
      "com.google.android.gms",
      "com.google.android.gsf",
      "com.google.android.ims",
      "com.google.android.tag",
      "com.google.android.tts",
      "com.google.android.overlay.permissioncontroller",
      "com.android.calllogbackup",
      "com.google.android.partnersetup",
      "com.android.safetyregulatoryinfo",
      "com.google.android.apps.wallpaper.nexus",
      "com.android.dynsystem",
      "com.android.sdm.plugins.connmo",
      "com.google.android.googlequicksearchbox",
      "com.android.providers.calendar",
      "com.android.providers.media",
      "com.google.android.apps.docs.editors.docs",
      "com.google.android.onetimeinitializer",
      "com.google.android.ext.shared",
      "com.android.internal.systemui.navbar.gestural_wide_back",
      "com.quicinc.cne.CNEService",
      "com.estsoft.alyac",
      "com.android.theme.color.cinnamon",
      "com.google.android.apps.diagnosticstool",
      "com.google.euiccpixel",
      "com.android.theme.icon_pack.rounded.systemui",
      "com.android.simappdialog.auto_generated_rro_product__",
      "com.android.safetyregulatoryinfo.auto_generated_rro_product__",
      "com.android.externalstorage",
      "com.google.android.apps.enterprise.dmagent",
      "com.android.htmlviewer",
      "com.qualcomm.qti.uceShimService",
      "com.android.companiondevicemanager",
      "com.verizon.obdm_permissions",
      "com.android.mms.service",
      "com.android.providers.downloads",
      "com.google.android.cbrsnetworkmonitor",
      "com.android.sdm.plugins.usccdm",
      "com.android.systemui.auto_generated_rro_product__",
      "com.google.android.apps.messaging",
      "com.google.android.soundpicker",
      "com.android.theme.icon_pack.rounded.android",
      "com.breel.wallpapers18",
      "com.qualcomm.qti.telephonyservice",
      "com.android.theme.icon_pack.circular.themepicker",
      "com.google.android.configupdater",
      "com.google.android.overlay.googlewebview",
      "com.google.android.apps.safetyhub",
      "com.android.timezone.updater",
      "com.google.ar.core",
      "com.android.providers.downloads.ui",
      "com.android.vending",
      "com.android.pacprocessor",
      "com.android.simappdialog",
      "com.nuts.extremspeedup",
      "com.android.internal.display.cutout.emulation.tall",
      "com.android.certinstaller",
      "com.android.theme.color.black",
      "com.google.android.marvin.talkback",
      "com.android.theme.color.green",
      "com.android.theme.color.ocean",
      "com.android.theme.color.space",
      "com.android.internal.systemui.navbar.threebutton",
      "com.google.android.apps.work.oobconfig",
      "com.qti.qualcomm.datastatusnotification",
      "com.android.hotwordenrollment.xgoogle",
      "com.google.android.pixel.setupwizard",
      "com.android.theme.icon_pack.rounded.launcher",
      "com.google.android.grilservice",
      "com.android.egg",
      "com.android.mtp",
      "com.android.nfc",
      "com.android.ons",
      "com.android.stk",
      "com.android.backupconfirm",
      "com.android.theme.font.arvolato",
      "com.android.systemui.auto_generated_rro_vendor__",
      "com.google.android.deskclock",
      "com.android.statementservice",
      "com.android.hotspot2",
      "com.google.android.as",
      "com.google.android.gm",
      "com.google.android.carrier",
      "com.google.android.apps.tachyon",
      "com.android.sdm.plugins.sprintdm",
      "com.android.internal.systemui.navbar.gestural_extra_wide_back",
      "com.google.android.permissioncontroller",
      "com.google.intelligence.sense",
      "com.google.android.setupwizard",
      "com.qualcomm.qcrilmsgtunnel",
      "com.android.providers.settings",
      "com.android.sharedstoragebackup",
      "com.verizon.services",
      "com.android.nfc.auto_generated_rro_product__",
      "com.google.android.euicc",
      "com.google.android.music",
      "com.android.printspooler",
      "com.android.hotwordenrollment.okgoogle",
      "com.android.sdm.plugins.diagmon",
      "com.android.theme.icon_pack.filled.settings",
      "com.android.dreams.basic",
      "com.android.providers.settings.auto_generated_rro_product__",
      "com.android.se",
      "com.android.inputdevices",
      "com.google.android.apps.wellbeing",
      "com.google.android.dialer",
      "com.google.android.dialer",
      "com.android.bips",
      "com.google.audio.hearing.visualization.accessibility.scribe"
    ]
  }

eyes sources > assets > web > url.html 내 내부 연결 사이트 존재

화상공증 요청 시도 시 해당 피싱 사이트로 리다이렉트

(국가별 최상위 도메인(국가 코드)가 CC: 코코스 제도)

<script>
//alert("화상공증 요청을 신청햇습니다 .\n 잠시만 대기해 주시면 영상요청이  들어옵니다.")
window.location.href = "http://nimabi7.gnway.cc/seoul/kics/login.html";

 

내부 secret-classes.dex 파일 내 악성 코드 존재, 복호화하는 과정 관련 키 값이 포함되지 않아 정적 분석 불가

 

eyes apk > AndroidManifest.xml 파일: 악성 앱이 요구하는 권한

(네트워크 연결 상태 정보, foreground 서비스, 휴대전화 번호, 앱 설치/삭제 권한 등)


두번째 파일, ibk apk 분석

내부 rmDDnx.apk, tefwMF.apk 파일 존재

해당 apk 파일 우클릭하여 Open In > File Path (Ctrl + Alt + F12)

내부 파일 구조 비교

assets 내 mp3 파일: 상담센터 ARS 음성 파일(금감원, 우리은행, 신한은행, SBI저축은행, NH농협 캐피탈 등)

 

AndroidManifest.xml 파일 내부에, 악성 앱이 요구하는 권한은 eyes apk 파일과 유사하며

초기 접근 시 사용자 계정 컨트롤 설정(디바이스를 변경할 수 있도록 허용할지)에 해당하는 권한이 포함된 정보들 존재)

 

728x90
728x90
728x90
반응형
목차
1. 순서 보존 암호 최신 연구 동향 (220810)
2. [2022년 7월] 인터넷·정보보호 법제동향 제178호 (220805)

1. 순서 보존 암호 최신 연구 동향 (220810)

(출처: 정보통신기획평가원 IITP, 주간기술동향 2058호, 한국전자통신연구원 이영경 연구원, 조남수 책임연구원)

순서 보존 암호(Order-Preserving Encryption)

  • 데이터 보호와 활용성 모두를 동시에 제공, 높은 효율성을 가진 실용화 가능성이 큰 기술
  • 정의에 따라 데이터의 크기 순서를 노출하는 암호 기법
  • 빈도수 감춤 기법을 사용하지 않아도 되는 경우: 중복이 거의 발생하지 않는 데이터(e.g. 주민등록번호, 일련번호)
  • 추론 공격에 위험한 경우: 암호화하려는 데이터셋이 공개되어 있는 데이터셋과 유사한 분포를 가지고, 빈도수 숨김이 없는 암호화

2. [2022년 7월] 인터넷·정보보호 법제동향 제178호 (220805)

(출처: 한국인터넷진흥원, 지식플랫폼 > 동향분석 > 인터넷·정보보호 법제 동향, 법제연구팀 김홍빈(061-820-1704))

공포된 법령

  • 「산업 디지털 전환 촉진법 시행령」 제정령 공포 (2022. 7. 4.)
  • 「전자정부법 시행령」 일부개정령 공포 (2022. 7. 11.)
  • 「인터넷주소자원에 관한 법률 시행령」 일부개정령 공포 (2022. 7. 11.)
  • 「디지털플랫폼정부위원회의 설치 및 운영에 관한 규정」 제정령 공포 (2022. 7. 1.)산업 디지털 전환 촉진법 시행령 제정령 공포

 

 

728x90
728x90
728x90
반응형
목차
1. 과학기술&ICT 정책·기술 동향 (220729)
2. 해양 선박 사이버보안 동향 (220803)

1. 과학기술&ICT 정책·기술 동향

(출처: 글로벌 과학기술정책정보 서비스 S&T GPS, 과학기술&ICT 정책·기술 동향 219호)

NFT 최근 산업동향과 시사점

  • 나만의 자산, NFT(Non-Fungible Token)의 등장
  • 고유한 정보, 상호 교환 불가, 분할이 되지 않는 특성
  • 디지털상에 존재하는 유・무형 자산에 소유권을 부여하는 것이 핵심
  • NF와 FT 특성 비교: 대체 불가능한 고유값(정보)으로 디지털 자산을 '가치화'하여 투자자산으로서 거래할 수 있도록 환경을 구축한 것이 NFT의 핵심 가치

블록체인 기술의 변화 과정

<자료> 한국인터넷진흥원(KISA)

크립토펑크(Cryptopinks) 프로젝트

  • '17년 뉴욕 소프트웨어 회사 라바랩스가 개발한 이더리움 기반의 프로젝트
  • 현재 NFT 프로젝트 중 가장 오래된 프로젝트(NFT의 시초)
  • 가로·세로 24픽셀로 이루어진 얼굴 이미지의 아바타 총 10,000개를 발행
  • 아바타들은 서로 다른 외모, 성격, 스타일을 지니며 그 특성이 희귀할수록 높은 가치로 평가
  • 크립토펑크는 남자 6,039개, 여자 3,840개, 좀비 88개, 유인원 24개, 외계인 9개로 구성

<자료> Larvalabs

대표 NFT 담보 대출 거래 플랫폼 NFTfi

  • NFTfi: NFT 자산을 담보로 스마트 계약을 통해 거래 당사자 간에 P2P 방식으로 거래되는 플랫폼

<자료> NFTfi

2022년 상반기 국내외 주요 기업의 AI반도체 개발 동향

  • KT: 하드웨어와 소프트웨어를 동시에 제공하는 풀스택 사업자로 도약하기 위해 AI 스타트업과 협력을 확대하며 반도체 생태계 구축 박차

KT AI 반도체 풀 스택 확보 전략

<자료> KT 뉴스룸


2. 해양 선박 사이버보안 동향

(출처: 글로벌 과학기술정책정보 서비스 S&T GPS, 과학기술&ICT 정책·기술 동향 219호)

  • 해양 선박 네트워크 보안에서의 대응방안: MAC(Media Access Control) 주소 기반의 통제
  • MAC 주소는 제품이 생산되는 단계에서 할당되어 원칙적으로 변경이 불가하므로 IP 주소 기반 통제보다 좀 더 강력한 접근통제가 가능

해양 선박 네트워크 위협에 대한 보안장비 구성

<자료> 2022 해양 선박 보안 & 보안 GRC 워크숍 “안전한 OT 보안 환경 및 엣지 - 클라우드 컴퓨팅 환경 구축 방안” 나온웍스 이준경

 

 

728x90
728x90
728x90
반응형
목차
1. 반복문
2. for-sequence문
3. for-range()문
  1) range()
  2) for-range(a, b)
  3) for-range(a)
4. while
  1) 변수 수정
  2) break문

[Review] (3주차) 리스트

2022.07.28 - [Development/Python] - [Python] 03 리스트 - week.03

 

[Python] 03 리스트 - week.03

목차 1. 리스트 활용 1) append(d) 2) insert(i, d) 3) remove(d) 4) sort() 2. 시퀀스 자료형 1) 인덱싱, 슬라이싱 2) in: 멤버 조회 3) len: 길이 확인 4) 연결(+), 반복(*) [Review] (2주차) 조건문 2022.07.22..

sarahee.tistory.com


1. 반복문

어떠한 조건이나 범위 내에서 어떠한 명령을 반복적으로 수행하는 것


2. for-sequence문

Point I
원소로 반복하는 방법
시퀀스의 원소를 하나씩 변수에 넣어가면서 명령 실행

nums = [1, 2, 3, 4, 5]
for i in nums:
    print(2*i)
        
## 실행 결과 ##
2
4
6
8
10

3. for - range()문

Point I
range() : 숫자 시퀀스를 만들어주는 함수

  • range(a, b) : a 이상 b 미만의 숫자 시퀀스를 만들어 줌
  • range(a) : 0이상 a미만의 숫자 시퀀스를 만들어줌

Point II
for-range(a, b)범위로 반복 (a 이상 b 미만)

#1 이상 11 미만의 범위 반복
for i in range(1, 11): 
    print(i)
    
## 실행 결과 ##
1
2
...
9
10

Point III
for-range(a) : 횟수로 반복 (a번)

#5회 반복
for i in range(5): 
    print("안녕!")
        
## 실행 결과 ##
안녕!
안녕!
안녕!
안녕!
안녕!

4. while

Point I
while 조건 : 조건이 True(참)인 동안 명령 실행

num = []
i = 0
while len(num) < 5:
    num.append(i)
    i = i+1
print(num)

## 실행 결과 ##
[0, 1, 2, 3, 4]

Point II
조건이 True일 동안 명령을 수행하므로, 반복이 끝나도록 코드를 작성해야 함
조건식에 들어가는 변수 수정, break문 사용 등이 있음

i = 0
while True: #break가 없다면 무한루프!
    print(i)
    if i >= 10:
        break #i가 10보다 커지면 탈출!
    i = i + 1

## 실행 결과 ##
0
1
2
...
9
10

[Next] (5주차) 기초 자료형2

2022.09.05 - [Development/Python] - [Python] 01 기초 자료형 II - week.05

 

[Python] 01 기초 자료형 II - week.05

목차 1. 시퀀스 활용 1) pop() 2) count() 3) split() 4) join() 2. Tuple(튜플) 3. Dictionary(사전형) 1) range() 2) for-range(a, b) 3) for-range(a) 4. while 1) 변수 수정 2) break문 [Review] (4주차) 반복..

sarahee.tistory.com

 

728x90
728x90
728x90
반응형
목차
1. Easy ELF 실습
  - 실습을 위한 사전 단계(Linux 파일 실행)
2. 분기문 분석
3. byte 및 배열 정리
4. 소스코드 작성(어셈블리어 기반)

[Review] (4주차) 이론 - 총정리

2022.07.19 - [Security & Analysis/IDA Pro] - [IDA Pro] 악성코드 정적분석 툴 사용법&이론 - week.04(전 과정 Review)

 

[IDA Pro] 악성코드 정적분석 툴 사용법&이론 - week.04(전 과정 Review)

개요 * Easy_KeygenMe.exe 파일 실습 1. 레지스터 활용 분석 - 메모리 주소 및 스택 프레임의 이해 - ESP(스택 포인터), EBP(프레임 포인터), EIP 등 개념 정리 2. 어셈블리 명령어 이해 및 알고리즘 분석 - Pse

sarahee.tistory.com


1. Easy ELF 실습

ELF 파일은 리눅스의 실행파일이므로, 실행시킨 후 랜덤 문자를 입력

Wrong 출력

파일 확장자를 모든 파일(All Files (*))로 변경

2. 분기문 분석

실행 후 View > Open subviews > Strings (or Shift + F12)

문자열 검색

리눅스 실행 시 조회된 문자열(Reversing.Kr Easy ELF, Wrong) 및 정답 출력 예상(Correct) 조회

Wrong 해당 그래프 모드 확인

Wrong graph

cmp를 통해 분기문 이동

jump if not zero(not equal) → eax가 1이라면(빨간색 화살표), Correct 연결

레지스터나 메모리 값을 변경하지 않고, 플래그 레지스터에만 영향을 줌

* flag register: 상태 레지스터

Correct graph

분기문 지나기 전 call 링크 두개

sub_8048434

sub_8048451

eax가 1이 되기 위해서는, 모든 분기문에서 조건 점프(초록색 화살표 이동)하여, 우측 하단으로 차례 이동

3. byte 및 배열 정리

첫 번째 조건문

byte_804A021의 값과 31h 비교

 

두 번째 조건문

byte_804A020을 eax에 저장하여,

첫 번째 문자(eax 내)와 0x34 XOR 연산

 

세 번째 문자(byte_804A022)와 0x32 XOR 연산

네 번째 문자(byte_804A023)와 0x0FFFFFF88 XOR 연산

다섯 번째 문자(byte_804A024)와 0x58 값이 같은지 비교

 

네 번째 조건문

테스트

 

네 번째 조건문

세번째 문자(byte_804A022)와 0x7C 비교

 

다섯 번째 조건문

첫번째 문자(byte_804A020)와 0x78 비교

 

여섯 번째 조건문

네번째 문자(byte_804A023)와 0x0DD 비교

No. CODE XREF 어셈블리어 10진수 to 문자(ASCII) 순서
1 sub_804851B+2A↓p cmp     al, 31h 0x31 = 49, chr(49) = 1 byte_804A021
2 sub_8048451+C↑j
loc_8048469
xor     eax, 34h
xor     eax, 32h
xor     eax, 0FFFFFF88h
cmp     al, 58h
0x34 = 52, chr(52) = 4
0x32 = 50, chr(50) = 2
0x88 = 136, chr(136) = (enter)
0x58 = 88, chr(88) = X
byte_804A020
byte_804A022
byte_804A023
byte_804A024
3 sub_8048451+4E↑j
loc_80484A8
test     al, al    
4 sub_8048451+60↑j
loc_80484BA
cmp     al, 7Ch 0x7C = 124, chr(124) = | byte_804A022
5 sub_8048451+72↑j
loc_80484CC
cmp     al, 78h 0x78 = 120, chr(120) = x byte_804A020
6 sub_8048451+84↑j
loc_80484DE
cmp     al, 0DDh 0xDD = 221, chr(221) = Ý byte_804A023

 

정리해보면, input 문자열은 다음과 같이 구성 (^: XOR)

input[0] ^ 34h = 78h

input[1] = 31h

input[2] ^ 32h = 7Ch

input[3] ^ 88h = DDh (byte이므로 88 앞의 FFFFFF는 무시)

input[4] = 58h

input[5]는 test(세 번째 조건문)

4. 소스코드 작성(어셈블리어 기반)

// string
ans = ""

ans += chr(0x34 ^ 0x78)
ans += chr(0x31)
ans += chr(0x32 ^ 0x7C)
ans += chr(0x88 ^ 0xDD)
ans += chr(0x58)

print(ans)

 

출력: L1NUX

Correct! 정답 출력

 

 

728x90
728x90
728x90
반응형

Listening

1. Choose the most appropriate response to complete each conversation.

W: Are you going to need your car this weekend?
M: Probably at some point. Why?
W: I was hoping to borrow it to get away for a bit.
M:
(a) Sorry, I was out of town.
(b) I'd be happy to drive you back.
(c) I can make do without it for a couple of days.
(d) I’ll be back by Monday.

해설:
부탁할 때 ‘I was hoping to부정사[that절] ~’이나 ‘I was wondering if I could(?)~’가 많이 쓰인다. 차를 빌려달라는 부탁에 대한 적절한 응답을 찾아야 한다. 차 없이도 지낼 수 있으니 빌려가라는 (c)가 정답이다.

번역:
여: 이번 주에 당신 차 쓰실 건가요?
남: 아마 언제쯤인가는요. 왜요?
여: 어디 좀 다녀오게 빌렸으면 했거든요.
남: 하루 이틀 정도는 차 없이 지낼 수 있어요.

주석:
get away: 휴가를 얻다, 떠나다, 벗어나다
make do: 임시 변통하다
out of town: 시외에, (여행이나 출장으로) 멀리 나가 있어, 출타 중에

정답: (c)
정답률 : 74.22%

 

2. Choose the most appropriate response to complete each conversation.

W: You're dressed up today. What's the occasion?
M: I have a big meeting later today.
W: What's it about?
M:
(a) I’m up for promotion.
(b) Let’s discuss that in the meeting.
(c) It's Casual Friday at work today.
(d) We don’t have an official dress code.

해설:
“What’s it about?”이 연음 때문에 잘 안 들릴 수 있으니 주의해야 한다. 그 회의가 무엇에 관한 회의인지 물었으므로, 자신의 승진 건에 관한 회의라는 의미의 (a)가 정답이다.

번역:
여: 당신 오늘 잘 차려 입었네요. 무슨 일이에요?
남: 오늘 이따가 큰 회의가 있어요.
여: 무엇에 대한 것인데요?
남: 제가 승진 물망에 올라 있어요.

주석:
be dressed up: 옷을 잘 차려 입다
occasion: 특별한 때, 중요한 행사, 의식, 제전
be up for: (사람이)(선거 등의 후보로서) 출마하다, (사람, 단체가) (~을 향해) 분발하고 있다
Casual Friday: (정장이 아닌) 평상복을 입는 금요일
dress code: 복장 규정

정답: (a)
정답률 : 86.29%

Vocabulary

1. Choose the option that best completes each sentence.
National chains are increasingly __________ local businesses which simply cannot keep up with the big competitors.

  •  (a) replacing
  •  (b) resuming
  •  (c) converting
  •  (d) arranging
해설:
관계대명사 “which” 뒤에서 지역 업체들이 거대 경쟁 업체들을 따라갈 수가 없다고 했으므로 앞에는 전국 규모의 체인점들이 지역의 소형 업체들을 대체하고 있다는 뜻이 되어야 알맞다. 따라서 대체한다는 뜻의 (a)가 정답이다.

번역:
전국 규모 체인점들이 거대 경쟁업체를 도저히 따라잡을 수 없는 지역 업체들을 갈수록 더 대체하고 있다.

주석:
keep up: (사람, 공부, 생각, 유행 등에) 뒤떨어지지 않도록 따라가다
replace: 대체하다, 대신하다, 바꾸다
resume: 재개하다, 다시 차지하다
convert: 전환하다, 개조하다, 개종하다
arrange: ~을 배열하다, 조정하다

정답: (a)
정답률 : 74.04%

 

2. Choose the option that best completes each sentence.
Thousands of consumers _______ our website each day to check out our low prices on household products.

  •  (a) run
  •  (b) visit
  •  (c) place
  •  (d) spend
해설:
온라인 상에서 웹사이트에 들어가서 보는 것은 바깥 세상에서 어떤 장소를 방문하는 것과 마찬가지다. 따라서 website를 목적어로 취하면서 그곳에 방문한다는 뜻을 나타내는 동사는 (b)이다.

번역:
수천 명의 소비자들이 우리 가정용품들의 낮은 가격을 확인하려고 매일 우리 웹사이트를 방문한다.

주석:
consumer: 소비자
check out: ~을 확인하다, 조회하다
household: 가정의, 가족의, 가구의, 가사의

정답: (b)
정답률 : 97.89%

Grammar

1. Choose the option that best completes each sentence.
The artist attempted to break ____________ convention by experimenting with new materials for his sculptures.

  •  (a) to
  •  (b) with
  •  (c) into
  •  (d) on
해설:
전치사 ‘with’가 분리를 뜻하는 경우도 있는데, ‘break with’(~와 관계를 끊다), ‘part with’(~와 헤어지다), ‘dispense with’(~없이 지내다)가 그에 해당한다. ‘break with’에는 전통이나 관습을 버린다는 뜻이 있으므로 (b)가 정답이다.

번역:
그 예술가는 조각에 새로운 재료를 가지고 실험함으로써 관습에서 벗어나려고 시도했다.

주석:
break with: (전통, 생각 따위)를 버리다, ~와 관계를 끊다
convention: (사회의 일반적인) 관례, 관습, 인습
material: 재료, 원료, 소재
sculpture: 조각, 조각품


정답: (b)
정답률 : 31.16%

 

2. Choose the option that best completes each sentence.
In Julie's opinion, the best part of being invited out last Friday for a burger and fries ________ that she did not have to cook anything.

  •  (a) is
  •  (b) were
  •  (c) was
  •  (d) are
해설:
주어가 “the best part”이고 ‘지난 금요일’이라는 과거 시간 표현이 나와 있으므로 단수와 함께 쓰이고 과거 시제인 be동사 (c)가 정답이다. 참고로 빈칸 다음에 나오는 ‘that’절은 전체 문장의 보어에 해당한다.

번역:
줄리의 견해로는 지난 금요일 햄버거와 감자 튀김 외식에 초대 받은 일의 가장 좋았던 점은 요리를 할 필요가 없었다는 것이었다.

주석:
be invited out: 초대받아 나가다
fry: (-ies) 감자 튀김

정답: (c)
정답률 : 80.69%

Reading

1. Based on the given information, choose the option that best answers each question.
After more than five years of construction, the Guizhou telescope―the world’s biggest single-dish radio telescope―commenced operation in 2016. Although China has become one of the world’s economic giants, the country's science programs have typically been seen as of secondary importance. Chinese astronomers believe that the telescope will now pave the way for the nation to become a scientific superpower, and the researchers who led the project expressed hope that astronomical findings from the telescope would earn prestige for the nation.

 

Q: What is mainly being reported about the Guizhou telescope?

  •  (a) Its astronomical missions are set to reap economic returns.
  •  (b) Its construction required heavy governmental investment.
  •  (c) It represents an increased investment in scientific equipment.
  •  (d) It embodies China’s hope to gain international fame in science.
해설:
마지막 문장이 열쇠다. 이 망원경을 통해 중국이 과학 초강대국이 되고 중국의 위상이 높아지기를 학자들과 연구진이 바라고 있다고 했다. 따라서 이 망원경은 과학에 있어서 국제적인 명성을 얻고자 하는 중국의 희망의 구현체라고 할 수 있으므로 (d)가 정답이다.

번역:
5년 이상의 건설을 거쳐, 세계 최대 단일경 전파 망원경인 구이저우 천체 망원경이 2016년 작동을 개시했다. 중국은 세계 경제 대국들 중 하나가 되었지만, 과학 프로그램들은 보통 2류 정도로 취급되어 왔다. 중국 천문학자들은 그 망원경이 이제 중국이 과학 초강국이 되는 길을 닦을 것이라고 믿으며, 그 프로젝트를 이끈 연구자들은 그 망원경으로 인한 천문학적 발견들이 중국의 위상을 높여줄 것이라는 희망을 표명했다.

주석:
telescope: 망원경
single-dish: [천체망원경에서] 전파 수집판이 하나인, 단일경의
commence: 시작하다, 개시하다
findings: (연구, 조사의) 결과, 결론
prestige: 위상, 명성, 위신
return: 수익, 수입, 수확

정답: (d)
정답률 : 82.05%

 

2. Based on the given information, choose the option that best answers each question.
The Gaelic language was once prominent in northern and western Scotland, although its speakers today are less than 1% of Scotland’s population. Gaelic first came under threat in the eleventh century, when the reigning king of Scotland married the English Princess Margaret of Wessex. The princess spoke English rather than Gaelic and brought the Scottish church more in line with that of England. Gaelic declined from this time and was definitively replaced in Scotland by the year 1400. Scottish independence movements guaranteed its demise by promoting a Scottish form of English, known as the Scots language.

 

Q. What is the main topic of the passage?

  •  (a) How the Scots language came to prominence
  •  (b) Historical events that led to Gaelic’s decline in Scotland
  •  (c) Why Margaret of Wessex represented a threat to the Gaelic language
  •  (d) The Scots language’s impact on Scottish independence
해설:
게일어가 한때 스코틀랜드의 주류 언어였다가 거의 사멸 직전까지 가게 된 역사적인 추이를 설명한 글이다. 잉글랜드 공주가 스코틀랜드의 왕비가 된 사건, 그리고 스코틀랜드 독립운동으로 이어진 일련의 역사적 사건들을 그 원인으로 설명하고 있으므로 (b)가 정답이다. 웨섹스의 마가렛이 게일어에 위협을 가한 내용도 글에 등장하기는 하지만 전체를 아우르는 주제는 아니므로 (c)는 정답이 아니다.

번역:
게일어는 현재는 사용자가 스코틀랜드 인구의 1%도 안 되지만 한때는 북부 및 서부 스코틀랜드에서 지배적이었다. 게일어는 11세기에 처음으로 위험에 처했는데, 집권 중이던 스코틀랜드 왕이 잉글랜드 공주 웨섹스의 마가렛과 결혼한 것이었다. 그 공주는 게일어보다는 영어를 사용했고 스코틀랜드 교회를 잉글랜드 교회에 동화시켰다. 게일어는 이 시기부터 쇠퇴했고, 1400년에 이르러서는 스코틀랜드에서 완전히 대체되었다. 스코틀랜드 독립 운동이 스코츠어로 알려진 스코틀랜드식 영어를 촉진함으로써 게일어의 소멸을 확실히 했다.

주석:
prominent: 저명한, 우세한, 유명한
reigning: 군림하는, 정권을 잡고 있는, 챔피언 자리에 있는
bring ~ in[into] line with: ~을 일치시키다, 조화시키다, 동화시키다
definitively: 결정적으로, 명확하게
demise: 사망, 서거, (왕위의) 계승
impact: 충격, 영향

정답: (b)
정답률 : 78.15%

 

 

728x90
728x90

'Language > TEPS' 카테고리의 다른 글

[Weekly TEPS] 02_July 25, 2022  (0) 2022.08.04
[Weekly TEPS] 01_August 1, 2022  (0) 2022.08.03
728x90
반응형

Listening

1. Choose the most appropriate response to complete each conversation.

W: I bumped into your wife at the mall yesterday.
M: I heard you two had lunch together.
W: Yeah, it was a blast. Has she always been that funny?
M:
(a) Too bad you guys missed each other yesterday.
(b) She does have quite a sense of humor.
(c) I’d like to meet her sometime.
(d) Yeah, I’ll have to introduce you two.

해설:
부인이 원래 재미있는 사람이냐고 물었으므로, 유머 감각이 상당히 있다는 (b)가 정답이다. 두 여자가 이미 우연히 만났으므로 (a)와 (d)는 대화의 맥락에 어울리지 않는다.

번역:
여: 어제 당신 부인과 우연히 마주쳤어요.
남: 둘이 같이 점심을 했다면서요?
여: 예, 정말 재미있었어요. 부인이 원래 그렇게 재미있나요?
남: 유머 감각이 꽤 있지요.

주석:
bump into: ~와 우연히 마주치다, 만나다
blast: 큰 즐거움, (특히 흥청거리는) 파티, 흥겨운 상태 ex) have a blast: 흥겨운 시간을 보내다
miss: (사람을) 만나지 못하다

정답: (b)
정답률 : 83.59%

 

2. Choose the most appropriate response to complete each conversation.

M: Let's watch a movie tonight. How about 11 p.m.?
W: Sounds good, but I have to ask my dad if it's OK.
M: You're an adult. Do you really have to ask for permission?
W:
(a) No, I'm not watching a film with my dad.
(b) Well, you will be in a few more years.
(c) Yeah, my parents are still strict about curfew.
(d) Go ahead. You have my full support.

해설:
밤에 영화를 보러 가는 데 부모님의 허락을 받아야 하는 상황이나 이유를 밝혀야 한다. 따라서 부모님이 귀가 시간을 엄격하게 지키게 한다는 뜻에서 (c)가 정답이다. “curfew”는 원래 야간 통행금지 시간을 알리는 교회종에서 유래해서 외출 금지 시간 또는 규정을 뜻한다.

번역:
남: 오늘밤에 영화 보자. 밤 11시 어때?
여: 좋기는 한데, 그래도 되는지 아빠한테 여쭤봐야 해.
남: 넌 성인이야. 정말 허락을 구해야 돼?
여: 응, 우리 부모님은 여전히 귀가 시간 규정에 엄격하셔.

주석:
permission: 허가, 허락, 승인
curfew: 외출 금지 시각
You have my full support: 너에게 완전히 찬성한다. 너를 완전히 지원한다.

정답: (c)
정답률 : 90.10%

Vocabulary

1. Choose the option that best completes each sentence.
Data from the video was used to _________ the bird's flight path onto the computer, creating a map that scientists could then study.

  •  (a) redeem
  •  (b) redevelop
  •  (c) reconstruct
  •  (d) redefine
해설:
‘다시’를 뜻하는 접두어인 re-가 들어간 단어들 중에서 문맥에 맞는 단어를 찾는 문제다. 컴퓨터 상에 재구성하거나 재현한다는 뜻의 동사가 들어가야 한다. 구성하거나 건설한다는 뜻의 동사인 ‘construct’ 앞에 접두어 re-를 붙인 (c)가 이에 해당한다.

번역:
그 비디오에서 나온 데이터는 그 새의 비행 궤적을 컴퓨터 상에서 재현해내는 데 사용되어, 그 다음 과학자들이 연구할 수 있는 지도를 만들어냈다.

주석:
flight: 비행, 날기, 비행기 여행
redeem: (외상값, 채무, 채권을) 갚다, 상환하다, 변제하다, (명예, 권리, 지위 등을) 회복[만회]하다
redevelop: ~을 재건하다, 재개발하다
reconstruct: 전체 모양을 재현하다, 복원하다
redefine: 재정의하다, 고쳐 정의하다

정답: (c)
정답률 : 61.64%

Grammar

1. Choose the option that best completes each sentence.

______________ all the milk in the saucer, the kitten fell asleep on the pillow.

  •  (a) Finish
  •  (b) To finish
  •  (c) Having finished
  •  (d) To have finished
해설:
접시 속 우유를 다 먹은 다음 잠이 들었을 것이므로, 더 먼저 일어난 일인 우유를 다 먹은 부분을 완료 분사 “having finished”로 나타내서 완료분사구문을 완성하는 (c)가 정답이다.

번역:
접시 속 우유를 모두 먹은 그 고양이는 베개 위에서 잠이 들었다.

주석:
saucer: (커피 잔 따위의) 받침, 접시 모양의 것
fall asleep: 잠이 들다

정답: (c)
정답률 : 81.90%

Reading

1. Based on the given information, choose the option that best answers each question.

 

Q: What is the main purpose of the passage?

  •  (a) To urge people to sign up to become organ donors
  •  (b) To describe the risks of having an organ transplant
  •  (c) To explain how to sign up to become an organ donor
  •  (d) To clarify why many people require organ transplants
해설:
장기 기증자 카드를 작성해서 공식적인 장기 기증 서약을 하라고 강력히 권하는 내용이므로 (a)가 정답이다. (c)는 장기 기증자가 되는 방법을 설명한다는 뜻인데, 본문이 장기기증자가 되는 방법을 기술하고 있지는 않으므로 정답이 아니다.

번역:
바로 지금, 많은 환자들이 생명을 구하는 장기 이식 대기자 명단에 올라 있습니다. 우리들 대부분은 사고로 사망한다면 장기를 이식할 의향이 있지만, 병원에게 우리의 장기를 가져가도록 허가해주는 장기 기증자 카드를 작성하는 것은 소홀히 합니다. 기다릴 필요가 없습니다. 장기 기증이 옳은 일이라고 생각하는 사람은 모두 오늘 카드를 작성해야 합니다. 이 작은 한 걸음이 누군가의 삶을 크게 바꿔 놓을 수 있습니다.

주석:
organ: [생물] 기관, 장기
transplant: 이식, 이식 수술
pass away: 사망하다
fill out: (서류, 신청서를) 작성하다
authorize: (남에게) 권한을 부여하다, 권한을 주다
make a difference: 큰 변화를 가져오다, 영향을 미치다
urge: 설득하다, 열심히 권하다
sign up: 신청하다, 등록하다 ((for))
organ donor: 장기 기증자

정답: (a)
정답률 : 85.15%

 

 

728x90
728x90

'Language > TEPS' 카테고리의 다른 글

[Weekly TEPS] 03_July 18, 2022  (0) 2022.08.05
[Weekly TEPS] 01_August 1, 2022  (0) 2022.08.03

+ Recent posts