Beispiel #1
0
        private bool IsValidDylinkerAddress(ulong possibleDylinkerAddress)
        {
            MachOFile dylinker = new MachOFile(VirtualAddressReader.DataSource, possibleDylinkerAddress, true);

            return(dylinker.HeaderMagic.IsMagicValid.Check() &&
                   dylinker.Header.FileType == MachHeaderFileType.Dylinker);
        }
Beispiel #2
0
 public MachDyld(MachOFile dyldImage)
 {
     _dyldImage = dyldImage;
     _dyldAllImageInfosAddress = new Lazy <ulong>(FindAllImageInfosAddress);
     _dyldAllImageInfos        = new Lazy <DyldImageAllInfosV2>(ReadAllImageInfos);
     _imageInfos = new Lazy <DyldImageInfo[]>(ReadImageInfos);
     _images     = new Lazy <DyldLoadedImage[]>(ReadLoadedImages);
 }
Beispiel #3
0
 public MachCore(IAddressSpace dataSource, ulong dylinkerHintAddress = 0)
 {
     _dataSource          = dataSource;
     _machO               = new MachOFile(dataSource);
     _dylinkerHintAddress = dylinkerHintAddress;
     _dylinkerAddress     = new Lazy <ulong>(FindDylinker);
     _dylinker            = new Lazy <MachDyld>(() => new MachDyld(new MachOFile(VirtualAddressReader.DataSource, DylinkerAddress, true)));
     _loadedImages        = new Lazy <MachLoadedImage[]>(ReadImages);
 }
Beispiel #4
0
 public MachLoadedImage(MachOFile image, DyldLoadedImage dyldLoadedImage)
 {
     Image            = image;
     _dyldLoadedImage = dyldLoadedImage;
 }