Can someone provide an example of how to loop through this object in python and pull out 'value' where api = 'interesting' and arguments.name = 'FileName'?
Here is what I have so far.
This object has many more processes and calls....output has been omitted.
edit: I should mention that I am getting the following error when running this code: "TypeError: list indices must be integers, not str"
for k, v in object['behavior']['processes']['calls'].items():
if v['api'] == "interesting":
<loop through arguments next>
Object:
{"behavior": {
"processes": [
{
"parent_id": "312",
"process_name": "test.exe",
"process_id": "1184",
"first_seen": "2013-03-02 17:22:48,359",
"calls": [
{
"category": "filesystem",
"status": "FAILURE",
"return": "0xc000003a",
"timestamp": "2013-03-02 17:22:48,519",
"thread_id": "364",
"repeated": 0,
"api": "interesting",
"arguments": [
{
"name": "FileHandle",
"value": "0x00000000"
},
{
"name": "DesiredAccess",
"value": "0x80100080"
},
{
"name": "FileName",
"value": "c:\\cgvi5r6i\\vgdgfd.72g"
}, ...