2017/9/7 db tech showcase Tokyo 2017(JPOUG in 15 minutes)にて発表した内容です。
SQL大量発行に伴う処理遅延は、ミッションクリティカルシステムでありがちな性能問題のひとつです。
SQLをまとめて発行したり、処理の多重度を上げることができれば高速化可能です。ですが・・・
AP設計に起因する性能問題のため、開発工程の終盤においては対処が難しいことが多々あります。
そのような状況において、どのような改善手段があるのか、Oracleを例に解説します。
SANS @Night There's Gold in Them Thar Package Management DatabasesPhil Hagen
This document discusses how package management databases like RPM can provide useful evidence during Linux forensic examinations. It describes how RPM stores file metadata that can be queried to identify file ownership and validate installed packages. Examples are provided of using RPM to find modified or orphaned files, as well as techniques like directly validating the filesystem against package files to avoid issues with a compromised RPM database. The document encourages developing shell scripts to efficiently extract relevant RPM information.
WINDOWS MANAGEMENT INSTRUMENTATION – A FRONTDOOR FOR MALWARES!
Windows Management Instrumentation is an implementation of web based enterprise management. WMI was a packaged along with the OS since Windows 2000. In the recent version of Windows it has been bundled by default. Ever since the “protection” has been increased, attackers have been looking for alternative ways to do remote code execution, steal passwords and run with system privileges. There has been an increase in malware binaries which specifically use WMI for various privilege escalation purposes without getting detected. WMI was specifically abused by malware authors to target financial sector. It is easy to create a process on a remote machine with a WMI client. Since 2013 there has been various reports of malware using WMI to gather system data before executing predominant payload. This talk will give an introduction to WMI and demonstrate the various ways that WMI can be used as an attacker’s swiss army knife, how malware authors are using this to leverage their exploits, how the present day tools can be used and how to protect against these type of attacks.
This document discusses advanced threat hunting and identifying zero-day attacks infiltrating organizations. It begins with background on the speaker and an overview of the evolving threat landscape, including nation-states, criminal enterprises, and hacktivists. It then discusses how advanced threats may not be as sophisticated as assumed and how threats often "live off the land" by using existing tools to blend in. The document emphasizes that advanced threat hunting requires knowing what to look for, as threats can enter opportunistically but cause damage over time. It provides examples of living off the land techniques like using PowerShell and internal sites for command and control. The conclusion stresses the importance of understanding one's environment and capabilities when conducting threat hunting.
The document summarizes a presentation by Chris Sanders on analyzing the investigation process in digital forensics and incident response. Some key points:
1. Sanders argues that the field of digital security is undergoing a "cognitive revolution" to develop more structured and repeatable investigation methods.
2. He proposes using a scenario-based approach and investigation simulator to study how analysts navigate cases and make decisions. This could help identify ways to increase accuracy and speed.
3. Case studies analyzing novice and expert analysts found that novices rely more on intuition while experts employ more reflection and metacognition when investigating cases.
Logs, Logs, Every Where, Nor Any Byte to GrokPhil Hagen
The document discusses the importance of logs in network forensics investigations. It introduces Logstash, an open-source tool for centralized log aggregation and analysis. Logstash allows ingestion of logs from many sources in various formats, filtering and parsing of logs, and output to search databases. The document demonstrates using Logstash to ingest sample log files to provide a holistic view of network activity for investigation.
Computer forensics involves identifying, preserving, analyzing, and presenting digital evidence from computers or other electronic devices in a way that is legally acceptable. The main goal is not only to find criminals, but also to find evidence and present it in a way that leads to legal action. Cyber crimes occur when technology is used to commit or conceal offenses, and digital evidence can include data stored on computers in persistent or volatile forms. Computer forensics experts follow a methodology that involves documenting hardware, making backups, searching for keywords, and documenting findings to help with criminal prosecution, civil litigation, and other applications.
This is my slide deck from my session at the North Carolina Reading Conference last week in Raleigh, NC. I do staff development to schools and districts all over the country about best practices in literacy instruction. This topic is one of my most requested.
Active Directory のクラウド武装化計画 V2~"AD on Azure IaaS" or "Windows Azure Active Di...junichi anno
この資料のPPT版、および AD on IaaS の構築手順書は、以下のキャンペーンサイトから入手してくださいませ。
http://technet.microsoft.com/ja-jp/windowsserver/dn715816
大人の事情でごめんなさい。でも気合い入れて作った手順書です。
11. WMI Scriptingの基本形
'SWbemLocator オブジェクトの作成
Set Locator = CreateObject("WbemScripting.SWbemLocator")
‘ローカルコンピュータへの接続
Set Service = Locator.ConnectServer("", "root¥cimv2", "", "")
‘クエリーの定義(WQL:WMI Query Language)
strQuery = "Select * from Win32_NetworkAdapterConfiguration " & _
"where IPEnabled = True"
‘クエリーの実行(インスタンスを取得する)
Set objNet = Service.ExecQuery(strQuery)
'結果の参照
For each n in objNet
WScript.Echo n.caption
WScript.Echo n.MACAddress
Next
11
12. WMIスクリプトの実行権限
リモートコンピュータに対するゕクセス権の取得
Set Service = Locator.ConnectServer(RemoteHost,Namespace,User,Password)
特殊権限の取得
Set Locator = CreateObject("WbemScripting.SWbemLocator")
Set Service = Locator.ConnectServer("DC01", "root¥cimv2", "Dom¥administrator", "pass")
Service.Security_.Privileges.AddAsString "SeBackupPrivilege", True
Service.Security_.Privileges.AddAsString "SeSecurityPrivilege", True
strQuery = "Select * from Win32_NTEventlogFile" & _
" Where LogfileName = 'Security' "
Set obj = Service.ExecQuery(strQuery)
For each n in obj
r = n.BackupEventLog("C:¥tmp¥Security.evt")
Next
12
21. 一時的な監視例③
__InstanceCreationEventによるユーザーログオンの監視
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer("demo2008", "ROOT¥CIMV2", "", "")
Wscript.Echo "接続が完了しました"
strQueryCreate = "Select * FROM __InstanceCreationEvent WITHIN 5 " & _
"WHERE TargetInstance ISA 'Win32_LogonSession' ‚
Set objEventsCreation = objService.ExecNotificationQuery(strQueryCreate)
Do
Set CreationEvent = objEventsCreation.Nextevent
LogonId= CreationEvent.TargetInstance.LogonID
LogonType = CreationEvent.TargetInstance.LogonType
strQueryLU = "Select * " & _
‚FROM Win32_LoggedOnUser‛ ' Where Dependent like ‘%" & LogonId & "%’‚
Set objLoggedOnUser = objService.ExecQuery(strQueryLU)
For Each u in objLoggedOnUser
If instr(u.Dependent, LogonId) Then
Wscript.Echo u.Antecedent
ユーザーID
Wscript.Echo u.Dependent
ログオンID
End If
Next
Loop
21
22. 一時的な監視例③‘ (③をブラッシュアップ)
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer("demo2008", "ROOT¥CIMV2", "", "")
Wscript.Echo "接続が完了しました"
strQueryCreate = "Select * FROM __InstanceCreationEvent WITHIN 5 " & _
"WHERE TargetInstance ISA 'Win32_LogonSession' ‚
Set objEventsCreation = objService.ExecNotificationQuery(strQueryCreate)
Do
Set CreationEvent = objEventsCreation.Nextevent
LogonId= CreationEvent.TargetInstance.LogonID
LogonType = CreationEvent.TargetInstance.LogonType
Select Case LogonType
Case 0 strLogonType = "System"
Case 2 strLogonType = "Interactive"
Case 3 strLogonType = "Network"
Case 4 strLogonType = "Batch"
Case 5 strLogonType = "Service"
Case 6 strLogonType = "Proxy"
Case 7 strLogonType = "Unlock"
Case 8 strLogonType = "NetworkClearText"
Case 9 strLogonType = "NewCredentials"
Case 10 strLogonType = "RemoteInteractive(TS)"
Case 11 strLogonType = "CachedInteractive"
Case 12 strLogonType = "CachedRemoteInteractive"
Case 13 strLogonType = "CachedUnlock"
End Select 22
23. strQueryLoggedOnUser = "Select * " & _
"FROM Win32_LoggedOnUser"
Set objLoggedOnUser = objService.ExecQuery(strQueryLoggedOnUser)
For Each u in objLoggedOnUser
If instr(u.Dependent, LogonId) Then
arrAntecedent = Split(u.Antecedent,".")
Wscript.Echo Date & "," & Time & "," & _
LogonId & "," & arrAntecedent(2) & "," & strLogonType
Exit For
End If
Next
Loop
23
24. 一時的な監視例④
__InstanceDeletionEventによるユーザーログオフの監視
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer("demo2008", "ROOT¥CIMV2", "", "")
Wscript.Echo "接続が完了しました"
strQueryCreate = "Select * " & _
"FROM __InstanceDeletionEvent WITHIN 5 " & _
"WHERE TargetInstance ISA 'Win32_LogonSession' "
Set objEventsDeletion = objService.ExecNotificationQuery(strQueryCreate)
Do
Set DeletionEvent = objEventsDeletion.Nextevent
LogonId= DeletionEvent.TargetInstance.LogonID
LogonType = DeletionEvent.TargetInstance.LogonType
Wscript.Echo Date & "," & Time & "," & LogonId & "," & strLogonType
Loop
セッションの削除はログオフしてから1分程度を要する
24
30. 呼び出されるスクリプト(③‘’)
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer("demo2008", "ROOT¥CIMV2", "", "")
Set objFS = CreateObject("Scripting.FileSystemObject")
Wscript.Echo "接続が完了しました"
strQueryCreate = "Select * FROM __InstanceCreationEvent WITHIN 5 " & _
"WHERE TargetInstance ISA 'Win32_LogonSession' ‚
Set objEventsCreation = objService.ExecNotificationQuery(strQueryCreate)
Do
Set CreationEvent = objEventsCreation.Nextevent
LogonId= CreationEventTargetEvvent.TargetInstance.LogonID
LogonType = CreationEventTargetEvent.TargetInstance.LogonType
Select Case LogonType
Case 0 strLogonType = "System"
Case 2 strLogonType = "Interactive"
Case 3 strLogonType = "Network"
Case 4 strLogonType = "Batch"
Case 5 strLogonType = "Service"
Case 6 strLogonType = "Proxy"
Case 7 strLogonType = "Unlock"
Case 8 strLogonType = "NetworkClearText"
Case 9 strLogonType = "NewCredentials"
Case 10 strLogonType = "RemoteInteractive(TS)"
Case 11 strLogonType = "CachedInteractive"
Case 12 strLogonType = "CachedRemoteInteractive"
Case 13 strLogonType = "CachedUnlock"
End Select 30
31. strQueryLoggedOnUser = "Select * FROM Win32_LoggedOnUser"
Set objLoggedOnUser = objService.ExecQuery(strQueryLoggedOnUser)
For Each u in objLoggedOnUser
If instr(u.Dependent, LogonId) Then
arrAntecedent = Split(u.Antecedent,".")
Set objLogFile = objFS.OpenTextFile("C:¥tmp¥demoscript¥userlog.txt",8,True)
objLogFile.WriteLine Date & "," & Time & "," & LogonId & "," & _
arrAntecedent(2) & "," & strLogonType
objLogFile.Close
Wscript.Echo Date & "," & Time & "," & _
LogonId & "," & arrAntecedent(2) & "," & strLogonType
Exit For
End If
Next
Loop
31