Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSKeyedAchiverParser #2353

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8c95b82
'#1773 adds categories to include bplist files.
patrickdalla Oct 24, 2024
cb4281e
'#1773 Replaces Tika PListParser with IPED custom bplist parser
patrickdalla Oct 24, 2024
d2e553f
'#1773 PListParser implementation
patrickdalla Oct 24, 2024
af86f3a
'#1773 Configuration to make bplist preview html
patrickdalla Oct 24, 2024
fb314d5
'#1773 The style sheet to implement the BPList html tree view uses the
patrickdalla Oct 24, 2024
c9ae918
'#1773 Avoid showing empty details
patrickdalla Oct 24, 2024
7c3aa8f
'#1773 Parses great long numbers as datetime
patrickdalla Oct 24, 2024
a83115d
'#1773 Expands all parents of each hit
patrickdalla Oct 24, 2024
e0b12b6
'#1773 Represents values as li tag as it has no details.
patrickdalla Oct 24, 2024
4bf3fd1
'#1773 adds missing CSS and JS. Calls method to open tree nodes only
patrickdalla Oct 25, 2024
8784bea
'#1773 Set makepreview config to enable javascript execution to open
patrickdalla Oct 25, 2024
7d82ac9
'#1773 skip caracter escape when inside script tag
patrickdalla Oct 25, 2024
756372b
'#2351 Implements NSKeyedArchiver detector.
patrickdalla Oct 26, 2024
7b2f0bb
Merge branch 'BPListParser' into NSKeyedAchiverParser
patrickdalla Oct 26, 2024
86a10ea
'#2351 Removes erroneous line
patrickdalla Oct 26, 2024
b315d4c
'#2351 Creates function to scroll object into view, opening all its
patrickdalla Oct 28, 2024
ee770c4
'#2351 NSKeyedArchiver parser implementation.
patrickdalla Oct 28, 2024
1c2b28d
'#2351 Propagates path correctly to name date values metadata.
patrickdalla Oct 28, 2024
685cdce
'#2351 corrects js call.
patrickdalla Oct 28, 2024
8d158dd
'#2351 Implements some error avoidance code.
patrickdalla Oct 29, 2024
f7cc003
'#2351 Closes all parents of clicked object reference link to force back
patrickdalla Oct 29, 2024
c36fc03
'#2351 Adds suport for XML formatted plist files and shortens metadata
patrickdalla Oct 29, 2024
1ae4577
'#2351 Writes empty arrays as [] to make object links to this object
patrickdalla Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions iped-app/resources/config/conf/CategoriesConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
]}
]}
]},
{"name": "Apple Artifacts", "categories":[
{"name": "Apple Configuration Files", "mimes": ["application/x-bplist"]}
]},
{"name": "Google Drive", "categories":[
{"name": "GDrive Synced Files", "mimes": ["application/x-gdrive-cloud-graph", "application/x-gdrive-snapshot"]},
{"name": "GDrive File Entries", "mimes": ["application/x-gdrive-cloud-graph-registry", "application/x-gdrive-snapshot-registry"]}
Expand Down
1 change: 1 addition & 0 deletions iped-app/resources/config/conf/CategoriesToExpand.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ OLE files
Georeferenced Files
Peer-to-peer
Chrome Cache
Apple Configuration Files
#Event Files

# Generates registry reports:
Expand Down
3 changes: 2 additions & 1 deletion iped-app/resources/config/conf/MakePreviewConfig.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ supportedMimes = application/x-whatsapp-db; application/x-whatsapp-db-f; applica
supportedMimes = application/x-prefetch; text/x-vcard; application/x-emule-preferences-dat; application/vnd.android.package-archive; application/x-bittorrent-settings-dat

# List of mimetypes which parsers insert links to other case items into preview
supportedMimesWithLinks = application/x-emule; application/x-emule-part-met; application/x-ares-galaxy; application/x-shareaza-library-dat; application/x-shareaza-download; application/x-bittorrent-resume-dat; application/x-bittorrent-resume-dat-entry; application/x-bittorrent
supportedMimesWithLinks = application/x-emule; application/x-emule-part-met; application/x-ares-galaxy; application/x-shareaza-library-dat; application/x-shareaza-download; application/x-bittorrent-resume-dat; application/x-bittorrent-resume-dat-entry; application/x-bittorrent
supportedMimesWithLinks = application/x-bplist; application/x-apple-nskeyedarchiver; application/x-plist; application/x-bplist-webarchive; application/x-plist-webarchive; application/x-plist-memgraph; application/x-bplist-memgraph; application/x-bplist-itunes; application/x-plist-itunes
4 changes: 3 additions & 1 deletion iped-app/resources/config/conf/ParserConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
<parser class="iped.parsers.external.CompositeExternalParser"></parser>

<parser class="org.apache.tika.parser.apple.AppleSingleFileParser"></parser>
<parser class="org.apache.tika.parser.apple.PListParser"></parser>
<parser class="iped.parsers.plist.parser.PListParser"></parser>
<parser class="iped.parsers.plist.parser.NSKeyedArchiverParser"></parser>
<!-- <parser class="org.apache.tika.parser.apple.PListParser"></parser> -->
<parser class="org.apache.tika.parser.asm.ClassParser"></parser>
<parser class="org.apache.tika.parser.audio.AudioParser"></parser>
<parser class="org.apache.tika.parser.audio.MidiParser"></parser>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import com.dd.plist.NSDictionary;
import com.dd.plist.NSObject;
import com.dd.plist.NSString;
import com.dd.plist.PropertyListFormatException;
import com.dd.plist.PropertyListParser;

Expand All @@ -32,6 +33,7 @@ public class PListDetector implements Detector {
public static MediaType BITUNES = MediaType.application("x-bplist-itunes");
public static MediaType WA_USER_PLIST = MediaType.application("x-whatsapp-user-plist");
public static MediaType THREEMA_USER_PLIST = MediaType.application("x-threema-user-plist");
public static MediaType NSKEYEDARCHIVER_PLIST = MediaType.application("x-apple-nskeyedarchiver");

public static MediaType detectOnKeys(Set<String> keySet) {
if (keySet.contains("nodes") && keySet.contains("edges") && keySet.contains("graphEncodingVersion")) {
Expand All @@ -46,9 +48,24 @@ public static MediaType detectOnKeys(Set<String> keySet) {
} else if (keySet.contains("Threema device ID")) {
return THREEMA_USER_PLIST;
}

return BPLIST;
}

public static MediaType detectOnNodes(NSDictionary rootObj, Metadata metadata) {
NSObject archiver = rootObj.get("$archiver");
if (archiver != null) {
if (archiver instanceof NSString) {
if (archiver.toString().toLowerCase().equals("nskeyedarchiver")) {
return NSKEYEDARCHIVER_PLIST;
}
}
}

return detectOnKeys(rootObj.getHashMap().keySet());

}

/**
* @param input
* input stream must support reset
Expand Down Expand Up @@ -101,7 +118,7 @@ public MediaType detect(InputStream input, Metadata metadata) throws IOException
}

if (rootObj instanceof NSDictionary) {
return detectOnKeys(((NSDictionary) rootObj).getHashMap().keySet());
return detectOnNodes((NSDictionary) rootObj, metadata);
}
return BPLIST;
}
Expand Down
Loading
Loading