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

How to implements step over by frida stalker? #2844

Open
hackerhoon opened this issue May 2, 2024 · 0 comments
Open

How to implements step over by frida stalker? #2844

hackerhoon opened this issue May 2, 2024 · 0 comments

Comments

@hackerhoon
Copy link

hackerhoon commented May 2, 2024

Interceptor.attach(TargetFucntion, {
    onEnter: function(args){
        console.log("[CALLED] ", TargetFuncName)
        Stalker.follow(this.threadId, {
			transform: function(iterator) {
				
                let instruction = iterator.next()
                const startAddress = instruction.address;
                const isFunctionCode = startAddress.compare(TargetFucntion) >=0 && startAddress.compare(TargetFucntion.add(TargetFuncLen)) === -1;
		do 
                {
                    if (isFunctionCode)
                    {
                        if(instruction.mnemonic == "call")
                        {  
                            console.log(instruction.address, instruction)
                        }

                }
                iterator.keep();
                    
				} while ((instruction = iterator.next()) !== null);
	
				},
                
			})	
    },
    onLeave: function(retval){

        
		Stalker.unfollow(this.threadId)
        
        console.log("[RETURN] ", TargetFuncName)

    }
})

If Target Function is big and it call many functions, Run Stalker makes process dead.
I think Frida Stalker run only step into.
Is Step over possible?

@hackerhoon hackerhoon changed the title How to implements step into by frida stalker? How to implements step over by frida stalker? May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant