Closed d474b3r9 closed 6 years ago
Hi, just to echo that I'm encountering the same issue with Python 3.5.2 on Windows 10 and Python 3.6.3 on Windows 7. Python 2.7 doesn't raise the issue and processing completes successfully.
Edit: just did some further testing and the issue doesn't occur on Ubuntu 16.04 with Python 3.5.2.
I can send a sample EVTX by email if it helps with diagnosis?
hey @john-corcoran thanks for the additional info. this will be very helpful.
can you confirm all your interpreters are 64-bit?
Hi @williballenthin, just tested both 64-bit and 32-bit instances of Python 3.6.4 on Windows 7, and both gave the same exception at the same point as listed in the OP.
I'll email through a sample EVTX that is exhibiting the issue. Thanks for looking into it!
for the evtx file provided by @john-corcoran, the problematic record is number 21:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"><System><Provider Name="Microsoft-Windows-Diagnosis-DPS" Guid="{6bba3851-2c7e-4dea-8f54-31e5afd029e3}"></Provider>
<EventID Qualifiers="">115</EventID>
<Version>0</Version>
<Level>4</Level>
<Task>1</Task>
<Opcode>15</Opcode>
<Keywords>0x4000000800000000</Keywords>
<TimeCreated SystemTime="2017-07-31 15:44:22.804375"></TimeCreated>
<EventRecordID>21</EventRecordID>
<Correlation ActivityID="{9a6fb385-875e-46dd-a5c0-4c81ae940516}" RelatedActivityID=""></Correlation>
<Execution ProcessID="1144" ThreadID="2424"></Execution>
<Channel>Microsoft-Windows-Diagnosis-DPS/Operational</Channel>
<Computer>exploited</Computer>
<Security UserID="S-1-5-19"></Security>
</System>
<EventData><Data Name="ScenarioId">{180b3a99-8c39-4f12-b631-2031998efe45}</Data>
<Data Name="InstanceId">{9a6fb385-875e-46dd-a5c0-4c81ae940516}</Data>
<Data Name="OriginalActivityId">{00000000-0000-0000-0000-000000000000}</Data>
<Data Name="DiagnosticModuleImageName">%windir%\system32\radardt.dll</Data>
<Data Name="ResolutionId">{5ee64afb-398d-4edb-af71-3b830219abf7}</Data>
<Data Name="ResolutionSID">S-1-5-21-1478063154-1558866469-3193402370-1000</Data>
<Data Name="ResolutionSessionId">1</Data>
<Data Name="ResolutionExpirationDate">0001-01-01 00:00:00</Data>
<Data Name="DiagnosticModuleId">{45de1ea9-10bc-4f96-9b21-4b6b83dbf476}</Data>
</EventData>
</Event>
notably, the ResolutionExpirationDate
is empty. according to the py3 documentation, dates less than 1970 will raise an OSError
, which is what we see here. ref: https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp
this behavior changed in python 3.3, where OSError
is now raised instead of ValueError
. there's a handler for ValueError
here that needs to be updated.
issue addressed in 5fb7662506d2c39aee5a9a143a9cc47d3bdc461d
thanks to @SeekWellServer for reporting the issue, and @john-corcoran for providing a test binary!
Hello,
i am on windows 10 64 bits and i can't workaround this issue. This code works for another EVT file so i don't understand the problem and i am not enough skilled in python to debug it. If you want i can provide you the file involved to test by yourself.
Regards, Jonathan.