http://localhost:9000/collectNo domain setup needed! Works with localhost directly!
Enter your target backend URL:
๐จ Test Fresh Session Cookie Exploit
What happens:
1. Victim is sent through OAuth login flow
2. After successful login, victim is redirected to this server
3. Fresh session cookie is captured immediately! ๐ฏ
4. Works because returnUrl parameter has ZERO validation
5. Optionally captures additional credentials via fake login form
๐ Typical vulnerable endpoint pattern: /auth/*/login?returnUrl=
View Admin Panel to see all captured data
// Implement proper URL validation:
private validateReturnUrl(returnUrl: string | undefined): string {
if (!returnUrl || returnUrl === 'undefined') {
return this.configService.frontendUrl;
}
try {
const parsed = new URL(returnUrl);
const allowedHosts = [
'your-frontend.com',
'your-domain.com'
// DO NOT include localhost in production!
];
// Exact hostname match only
if (allowedHosts.includes(parsed.hostname)) {
return returnUrl;
}
} catch (e) {
// Invalid URL format
}
// Default to safe URL
return this.configService.frontendUrl;
}
// Then use in your controller:
@Get('login')
async login(@Query('returnUrl') returnUrl: string) {
const safeReturnUrl = this.validateReturnUrl(returnUrl);
// Use safeReturnUrl for redirects
}