๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐ŸŽ iOS/iOS Application

(26)
[iOS, Network] Wireshark๋กœ ๋„คํŠธ์›Œํฌ ํŒจํ‚ท ๋ถ„์„ํ•˜๊ธฐ(5) - Wireshark ํ•„ํ„ฐ๋ง ๋ช…๋ น์–ด - IP ๊ฒ€์ƒ‰, ํฌํŠธ ๊ฒ€์ƒ‰ 1. IP ๊ฒ€์ƒ‰ (1) Source, DST ๋‘˜ ๋‹ค ip.add == 233.130.195.98 (2) Source ip.src == 233.130.195.98 (3) Destination ip.dst == 233.130.195.98 2. ํฌํŠธ(port) ๊ฒ€์ƒ‰ (1) Source, DST ๋‘˜ ๋‹ค tcp.port == 80 (2) Source tcp.srcport == 80 (3) Destination tcp.dstport == 80 3. ๋ช…๋ น์–ด ํ˜ผํ•ฉ (1) and >> ๋‘ ์กฐ๊ฑด ๋ชจ๋‘ ์„ฑ๋ฆฝํ•˜๋Š” ๊ฒฝ์šฐ ip.add == 233.130.195.98 and tcp.port == 80 (2) or >> ๋‘ ์กฐ๊ฑด ์ค‘ ํ•˜๋‚˜๋ผ๋„ ์„ฑ๋ฆฝํ•˜๋Š” ๊ฒฝ์šฐ ip.add == 233.130.195.98 or tcp.port == 80
[iOS, Network] Wireshark๋กœ ๋„คํŠธ์›Œํฌ ํŒจํ‚ท ๋ถ„์„ํ•˜๊ธฐ(4) - Wireshark๋กœ 4-way handshake ๋ถ„์„ํ•˜๊ธฐ TCP 4-way handshake 3 way handshake์™€ ๋ฐ˜๋Œ€๋กœ TCP ์—ฐ๊ฒฐ์„ ํ•ด์ œํ•  ๋•Œ ์ฃผ๊ณ  ๋ฐ›๋Š” ํ™•์ธ์ž‘์—…์ด๋‹ค. ์ด ์—ญ์‹œ 4๋ฒˆ์˜ ํ™•์ธ๊ณผ์ •์„ ๊ฑฐ์นœ๋‹ค๊ณ  ํ•˜์—ฌ 4-way handshake๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. TCP 4-way handshake๋ฅผ ๊ฐ„๋‹จํžˆ ํ‘œํ˜„ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. [4-way handshake] 1. Client์—์„œ ์ข…๋ฃŒ๋ฅผ ์•Œ๋ฆฌ๋Š” FIN FLAG ์„œ๋ฒ„๋กœ ์ „์†ก 2. FIN ํŒจํ‚ท์„ ์ •์ƒ์ ์œผ๋กœ ๋ฐ›์•˜๋‹ค๋Š” ACK๋ฅผ Client์— ์ „์†กํ•ด ์ค๋‹ˆ๋‹ค. ๊ทธํ›„ Server๋Š” CLOSE-WAIT ์ƒํƒœ๋กœ ๋น ์ง 3. ์—ฐ๊ฒฐ ์ข…๋ฃŒ ํ›„ Server๋Š” Client์—๊ฒŒ FIN FLAG ์ „์†ก 4. Server๋กœ ๋ถ€ํ„ฐ ์ „์†ก๋œ FIN FLAG๋ฅผ ๋ฐ›์€ Client๋Š” ํ™•์ธ์„ ์•Œ๋ฆฌ๋Š” ACK๋ฅผ ์„œ๋ฒ„๋กœ ์ „์†กํ•œ ํ›„, ์ผ์ • ์‹œ๊ฐ„ ๋™์•ˆ TIME-W..
[iOS, Network] Wireshark๋กœ ๋„คํŠธ์›Œํฌ ํŒจํ‚ท ๋ถ„์„ํ•˜๊ธฐ(3) - Wireshark๋กœ SSL Handshake(TLS Handshake) ๊ณผ์ • ๋ถ„์„ SSL Handshake(TLS Handshake) SSL handshake๋Š” HTTP์— ์ ‘์†ํ•˜๋Š” ๊ณผ์ •์œผ๋กœ 3 way handshake ๊ฐ€ ๋๋‚œ ๋’ค์— ์ด๋ฃจ์–ด์ง€๋Š” ๊ณผ์ •์ด๋‹ค. ํ†ต์‹ ๊ณผ์ •์—์„œ ์†ก์‹ ์ž์™€ ์ˆ˜์‹ ์ž๊ฐ€ ์•”ํ˜ธํ™” ํ†ต์‹ ์„ ์œ„ํ•œ ๋ฐฉ๋ฒ•๊ณผ ์ˆ˜๋‹จ์— ๋Œ€ํ•ด ๊ณต์œ ํ•œ๋‹ค. ์ฆ‰, ์•”ํ˜ธํ™”๋œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ตํ™˜ํ•˜๊ธฐ ์œ„ํ•œ Client์™€ Server์˜ ํ˜‘์ƒ ๊ณผ์ •. ํ˜‘์ƒ ๊ณผ์ •์—์„œ๋Š” SSL ์ธ์ฆ์„œ ์ „๋‹ฌ, ๋Œ€์นญํ‚ค(๋น„๋ฐ€ํ‚ค) ์ „๋‹ฌ, ์•”ํ˜ธํ™” ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๊ฒฐ์ •, SSL/TLS ํ”„๋กœํ† ์ฝœ ๊ฒฐ์ • ๋“ฑ์ด ํฌํ•จ. (1) Client Hello (ํด๋ผ์ด์–ธํŠธ -> ์„œ๋ฒ„) : ์•”ํ˜ธํ™” ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋‚˜์—ด ๋ฐ ์ „๋‹ฌ ํด๋ผ์ด์–ธํŠธ๋Š” ํ†ต์‹ ํ•˜๊ณ ์ž ํ•˜๋Š” TLS ๋ฒ„์ „, ์ž์‹ ์ด ์ง€์›ํ•˜๋Š” cipher ๋ฆฌ์ŠคํŠธ, ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์ƒ์„ฑํ•œ ๋‚œ์ˆ˜ ์ •๋ณด๋ฅผ ๋ณด๋‚ธ๋‹ค. Cipher Suite์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋”ฐ๋ผ ๋ฐ์ด..
[iOS, Network] Wireshark๋กœ ๋„คํŠธ์›Œํฌ ํŒจํ‚ท ๋ถ„์„ํ•˜๊ธฐ(2) - Wireshark๋กœ HTTP Handshake, 3 Way-Handshake ๋ถ„์„ํ•˜๊ธฐ ์‚ฌ์ „ Setting์„ ํ†ตํ•ด ์•„์ดํฐ ํŒจํ‚ท ๋ฏธ๋Ÿฌ๋ง์— ์„ฑ๊ณตํ–ˆ๋‹ค๋ฉด, ์•„์ดํฐ์—์„œ ์ผ์–ด๋‚˜๋Š” ๋„คํŠธ์›Œํฌ ํ†ต์‹ ์„ Wireshark๋ฅผ ํ†ตํ•ด ํŒจํ‚ท ๋ถ„์„ํ•˜๋Š” ๋ฐฉ๋ฒ•๊ณผ HTTP Handshake, ๋ฐ์ดํ„ฐ ํ†ต์‹ ๊ณผ์ •์„ ํ™•์ธํ•ด๋ณด์ž! โญ๏ธ ํ…Œ์ŠคํŠธ ๋ฐฉ๋ฒ•โญ๏ธ Wireshark๋ฅผ ์‹คํ–‰ ์ธํ„ฐํŽ˜์ด์Šค์—์„œ ์—ฐ๊ฒฐ๋œ ๋””๋ฐ”์ด์Šค๋ฅผ ์„ ํƒํ•˜์—ฌ ์บก์ฒ˜ ์‹œ์ž‘(์‚ฌ์ „ Setting์—์„œ ํ™•์ธ) ์•„์ดํฐ์œผ๋กœ ์‚ฌํŒŒ๋ฆฌ ์‹คํ–‰ ์‚ฌํŒŒ๋ฆฌ์—์„œ ๋„ค์ด๋ฒ„์— ์ ‘์† ์บก์ฒ˜๋ฅผ ์ข…๋ฃŒ ํ›„ ํŒจํ‚ท ๋ถ„์„ [ ์‚ฌ์ „ Setting ๋ฐฉ๋ฒ• ] [iOS, Network] Wireshark๋กœ ๋„คํŠธ์›Œํฌ ํŒจํ‚ท ๋ถ„์„ํ•˜๊ธฐ(1) - iOS ํŒจํ‚ท ์บก์ณํ•˜๊ธฐ โญ๏ธ ์ค€๋น„์‚ฌํ•ญ โญ๏ธ Xcode ์„ค์น˜ ์•„์ดํฐ์˜ ํŒจํ‚ท์„ ๋ถ„์„ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Remote Virtual Interface ์‚ฌ์šฉ Xcode๋ฅผ ์„ค์น˜ํ•ด์•ผ ์„ค์น˜๋œ๋‹ค. Wireshark ์„ค์น˜..
[iOS, Network] Wireshark๋กœ ๋„คํŠธ์›Œํฌ ํŒจํ‚ท ๋ถ„์„ํ•˜๊ธฐ(1) - iOS ํŒจํ‚ท ๋ฏธ๋Ÿฌ๋ง โญ๏ธ ์ค€๋น„์‚ฌํ•ญ โญ๏ธ Xcode ์„ค์น˜ ์•„์ดํฐ์˜ ํŒจํ‚ท์„ ๋ถ„์„ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Remote Virtual Interface ์‚ฌ์šฉ Xcode๋ฅผ ์„ค์น˜ํ•ด์•ผ ์„ค์น˜๋œ๋‹ค. Wireshark ์„ค์น˜ ๋„คํŠธ์›Œํฌ ํŒจํ‚ท์„ ๋ถ„์„ํ•  ๋•Œ ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ํˆด๋กœ, ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์—์„œ ๋ฌด๋ฃŒ๋กœ ๋‹ค์šด๋กœ๋“œํ•  ์ˆ˜ ์žˆ๋‹ค. https://www.wireshark.org/download.html โญ๏ธ ์‚ฌ์šฉ ๋ฐฉ๋ฒ• โญ๏ธ 1. ์•„์ดํฐ๊ณผ mac ์—ฐ๊ฒฐํ•˜์—ฌ ์•„์ดํฐ UDID ํ™•์ธ Finder๋ฅผ ํ†ตํ•ด ์—ฐ๊ฒฐ๋œ ์•„์ดํฐ์˜ UDID ์ •๋ณด ํ™•์ธ ๊ฐ€๋Šฅํ•˜๋‹ค. *UDID(Unique Device IDentifier) : iOS, tvOS, macOS๋ฅผ ์‹คํ–‰ํ•˜๋Š” Apple ๊ธฐ๊ธฐ์˜ ๊ณ ์œ ํ•œ ๊ธฐ๊ธฐ ์‹๋ณ„์ž 2. ํŒจํ‚ท ๋ฏธ๋Ÿฌ๋ง ์‹œ์ž‘ ์•ž์„œ ํ™•์ธํ•œ UDID์ •๋ณด์™€ rvictl ๋ช…๋ น์–ด ์‚ฌ์šฉํ•˜์—ฌ ํŒจํ‚ท ๋ฏธ..
[iOS] ์•ฑ์•„์ด์ฝ˜(App Icon) ์„ค์ •ํ•˜๊ธฐ 1. ์•„์ด์ฝ˜ ์ด๋ฏธ์ง€ ์ค€๋น„ํ•˜๊ธฐ - ์‚ฌ์ด์ฆˆ ๋ณ„๋กœ ์ค€๋น„ํ•˜๋Š” ๋ฐฉ๋ฒ• ์›ํ•˜๋Š” ์•„์ด์ฝ˜ ์ด๋ฏธ์ง€๋ฅผ ์ค€๋น„ํ–ˆ๋‹ค๋ฉด, ์•„๋ž˜ ์‚ฌ์ดํŠธ์— ๋“ค์–ด๊ฐ€ ๋ฆฌ์‚ฌ์ด์ง•ํ•ด์ค๋‹ˆ๋‹ค. App Icon Generator appicon.co ์‚ฌ์ดํŠธ์— ๋“œ๋ž˜๊ทธํ•ด์„œ ์ด๋ฏธ์ง€๋ฅผ ๋„ฃ๊ณ  ์•„๋ž˜ Generate ๋ฒ„ํŠผ ํด๋ฆญ!! 2. Assets ์„ค์ • Generate ํด๋ฆญ ์‹œ ๋ฐ”๋กœ AppIcons.zip ํŒŒ์ผ์ด ๋‹ค์šด๋ฉ๋‹ˆ๋‹ค. zip ํŒŒ์ผ์„ ์—ด๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด AppIcon.appiconset ์ด๋ž€ ํด๋” ์•ˆ์— ์‚ฌ์ด์ฆˆ ๋ณ„๋กœ ์ด๋ฏธ์ง€๋“ค์ด ๋“ค์–ด์žˆ์–ด์š”! ์ด ํด๋” '๊ทธ๋Œ€๋กœ' Xcode์˜ Assets.xacassets์— ๋“œ๋ž˜๊ทธํ•˜์—ฌ ๋„ฃ์–ด์ค๋‹ˆ๋‹ค!! ๋“œ๋ž˜๊ทธ ์‹œ ํ™•์ธํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ œ๋Œ€๋กœ import ๋˜์–ด์žˆ์–ด์š”~~๐Ÿ‘๐Ÿป ๋นŒ๋“œํ•ด๋ณด๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์•ฑ์•„์ด์ฝ˜์ด ์ž˜ ์ ์šฉ๋˜์–ด ์žˆ์Œ์„ ํ™•์ธ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ˜Š ๐Ÿ’ก ์•ฑ..
[Xcode] ์•ฑ ๊ธฐ๋ณธ ์–ธ์–ด ํ•œ๊ตญ์–ด๋กœ ๋ณ€๊ฒฝํ•˜๋Š” ๋ฒ• Xcode์—์„œ ์•ฑ ๊ธฐ๋ณธ ์–ธ์–ด ํ•œ๊ตญ์–ด๋กœ ๋ณ€๊ฒฝํ•˜๋Š” ๋ฐฉ๋ฒ•๐Ÿ˜Š [NEW ๋ฒ„์ „] 1. PROJECT → Info → Localization → “ + ” ํด๋ฆญ → Korean (ko) ์„ ํƒ 2. ์–ธ์–ด๋ฅผ ์ ์šฉํ•  ํŒŒ์ผ ์„ ํƒ ํ›„ Finish ํด๋ฆญ 3. Info → Localization ์—์„œ Korean ์ ์šฉ๋˜์—ˆ์Œ์„ ํ™•์ธ [๊ตฌ๋ฒ„์ „] 1. Xcode project์—์„œ ํ•œ๊ตญ์–ด ์ถ”๊ฐ€ํ•˜๊ธฐ 2. Info.plist์—์„œ Localization native development region์„ Korea์œผ๋กœ ๋ฐ”๊พธ๊ธฐ 3. ํ”„๋กœ์ ํŠธ์ด๋ฆ„.xcodeproj/project.pbxproj ํŒŒ์ผ์„ ๋‹ค๋ฅธ ์—๋””ํ„ฐ(atom, vs ๋“ฑ..)๋ฅผ ์ด์šฉํ•ด์„œ ํŽธ์ง‘ : developmentRegion๋ฅผ ๊ฒ€์ƒ‰ํ•˜์—ฌ developmentRegion = ko;๋กœ ๋ฐ”๊พธ๊ธฐ..
[iOS, Swift, Objective-C] ์•”ํ˜ธํ™” - SHA256 ๊ตฌํ˜„ํ•˜๊ธฐ ๐Ÿ’ก SHA256์ด๋ž€? SHA-256์€ SHA(Secure Hash Algorithm) ์•Œ๊ณ ๋ฆฌ์ฆ˜์˜ ํ•œ ์ข…๋ฅ˜๋กœ์„œ SHA-2 ๊ณ„์—ด ์ค‘ ํ•˜๋‚˜์ด๋ฉฐ, 2^256๋งŒํผ ๊ฒฝ์šฐ์˜ ์ˆ˜๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค. ์–ด๋–ค ๊ธธ์ด์˜ ๊ฐ’์„ ์ž…๋ ฅํ•˜๋”๋ผ๋„ 256๋น„ํŠธ์˜ ๊ณ ์ •๋œ ๊ฒฐ๊ณผ๊ฐ’(64์ž๋ฆฌ ๋ฌธ์ž์—ด(32byte))์„ ๋ฐ˜ํ™˜ํ•˜๊ณ , SHA-256์€ ๋‹จ๋ฐฉํ–ฅ ์•”ํ˜ธํ™” ๋ฐฉ์‹์ด๊ธฐ ๋•Œ๋ฌธ์— ๋ณตํ˜ธํ™”๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. SHA256 - ํ•ด์‹œ๋„ท SHA-256์€ SHA(Secure Hash Algorithm) ์•Œ๊ณ ๋ฆฌ์ฆ˜์˜ ํ•œ ์ข…๋ฅ˜๋กœ์„œ 256๋น„ํŠธ๋กœ ๊ตฌ์„ฑ๋˜๋ฉฐ 64์ž๋ฆฌ ๋ฌธ์ž์—ด์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค. SHA-256์€ ๋ฏธ๊ตญ์˜ ๊ตญ๋ฆฝํ‘œ์ค€๊ธฐ์ˆ ์—ฐ๊ตฌ์†Œ(NIST; National Institute of Standards and Technology)์— ์˜ํ•ด ๊ณตํ‘œ๋œ wiki.hash.kr ๐Ÿ’ก ํ•ด์‹œ(Hash)๋ž€?..

๋ฐ˜์‘ํ˜•