Exemplo n.º 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);
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 public MachLoadedImage(MachOFile image, DyldLoadedImage dyldLoadedImage)
 {
     Image            = image;
     _dyldLoadedImage = dyldLoadedImage;
 }