PageSourceSearch

https://bluelanternsecurity.io/StaticMalwareAnalyzer-CkdDmVEb.js

js bluelanternsecurity.io collected 2026-10-02 01:57:52 UTC 12,414 bytes, 1 lines download raw bytes

1import{i as ue,l as he,o as xe,q as pe,r as t,j as e,P as fe,t as be,d as H,s as ye,L as y,v as ge,w as je}from"./index-C86sjUM7.js";import{T as we}from"./ToolNavigation-BRVKy_Ic.js";import{F as Ne}from"./FreeTierScanMeter-4VpL8LJE.js";import{A as Ae,L as ve}from"./AlternativeSubmissionMethods-HiFwwICy.js";import{e as Z,f as Ce,h as ke,s as Se,M as Te,S as U,a as Re}from"./MalwareChecksPanel-DMAlp6cz.js";import{I as Ie}from"./info-D5zhcT7u.js";import"./book-open-Caz2b750.js";import"./lock-CAeLtCCS.js";import"./crosshair-CQNJkBVv.js";import"./shield-alert-cz1iZj9B.js";import"./link-2-CKxS_3iO.js";import"./puzzle-Bcj0v0f6.js";import"./chart-column-C1wJcOix.js";const Le=4.5*1024*1024;function Ze(){const{isAuthenticated:d,getValidToken:x}=ue(),{refreshCreditBalance:W,seatLicensed:_}=he(),{refreshRuns:V}=xe(),{registerJob:G,registerJobByType:K}=pe(),[n,S]=t.useState(null),[X,g]=t.useState(!1),[p,T]=t.useState(!1),[j,w]=t.useState(!1),[R,N]=t.useState(""),[Q,I]=t.useState(!1),[f,L]=t.useState(null),[A,P]=t.useState(!1),[,M]=t.useState(null),[,ee]=t.useState("Check pricing"),[se,b]=t.useState(!1),[c,v]=t.useState(!1),[m,C]=t.useState(Z),[F,E]=t.useState({}),[D,O]=t.useState(null),[te,z]=t.useState(!1),Y=t.useRef(null);t.useEffect(()=>{if(!d)return;(async()=>{try{const a=x(),l={"Content-Type":"application/json"};a&&(l.Authorization=`${a}`);const r=await fetch("https://api.bluelanternsecurity.io/tools",{method:"GET",headers:l});if(r.ok){const o=await r.json();let i=[];if(o.body&&typeof o.body=="string")try{i=JSON.parse(o.body).result||[]}catch{i=[]}else o.result?i=o.result:Array.isArray(o)&&(i=o);i.find(h=>h.id==="STATICMALWAREANALYZER")&&ee("Free")}}catch(a){console.error("Failed to fetch tool info",a)}})(),le()},[d,x]);const k=s=>{s.preventDefault(),s.stopPropagation(),s.type==="dragenter"||s.type==="dragover"?g(!0):s.type==="dragleave"&&g(!1)},ae=s=>{if(s.preventDefault(),s.stopPropagation(),g(!1),!d){b(!0);return}s.dataTransfer.files&&s.dataTransfer.files[0]&&B(s.dataTransfer.files[0])},ne=s=>{s.preventDefault(),s.target.files&&s.target.files[0]&&B(s.target.files[0])},B=s=>{if(s.size>Le){alert("Request too large. File size cannot exceed 4.5MB.");return}S(s),w(!1)},le=async()=>{z(!0);try{const{subToolCosts:s,allChecksCost:a}=await Ce(x());E(s),O(a)}catch(s){console.error("Failed to fetch sub-tool costs:",s)}finally{z(!1)}},$=()=>{S(null),w(!1),L(null),P(!1),M(null),v(!1),C(Z()),E({}),O(null)},oe=()=>{if(!d){b(!0);return}Y.current.click()},re=()=>{const s=!c;v(s),C(U.reduce((a,l)=>({...a,[l.key]:s}),{}))},ie=s=>{C(a=>{const l={...a,[s]:!a[s]},r=U.every(o=>l[o.key]);return v(r),l})},u=ke({allChecks:c,checks:m}),ce=async()=>{if(!n){alert("Please select a file first");return}if(!u){alert("Please select at least one analysis check to run.");return}if(!d){b(!0);return}const s=x();if(!s){alert("Authentication error. Please log in again.");return}T(!0);const a=new FormData;a.append("tool","STATICMALWAREANALYZER"),a.append("checkCost","false"),a.append("file",n),Re(a,{checks:m,allChecks:c});try{const l=await fetch("https://api.bluelanternsecurity.io/runs",{method:"POST",headers:{Authorization:`${s}`},body:a}),r=await l.json();let o=r;if(r.body&&typeof r.body=="string")try{o=JSON.parse(r.body)}catch(me){console.error("Failed to parse inner body",me)}const{jobId:i,cached:q,accepted:h}=ge(o);M(o),l.ok&&h?(i?(L(i),G(i,"STATICMALWAREANALYZER",n?.name||"uploaded file")):K("STATICMALWAREANALYZER",n?.name||"uploaded file"),P(q),w(!0),N(""),I(!1),W(),V()):(I(l.status===429),N(je(l.status,o)))}catch(l){console.error("API call failed:",l),N("Failed to submit malware analysis. Please try again later.")}finally{T(!1)}},J=Object.values(m).filter(Boolean).length,de=Se({allChecks:c,allChecksCost:D,checks:m,subToolCosts:F});return e.jsxs("div",{className:"tool-page min-h-screen bg-slate-950 text-white",children:[e.jsx(we,{}),e.jsx(fe,{title:"Static malware analyzer | YARA, IOC extraction, entropy | Blue Lantern",description:"Inspect suspicious binaries with YARA rule matching, IOC extraction, entropy analysis, and PE section review. Free scans to start, no subscription required.",path:"/static-malware-analyzer"}),e.jsxs("div",{className:"tool-content relative max-w-6xl mx-auto px-4 pb-12 pt-24 sm:px-6 sm:pb-16 sm:pt-28",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-3xl sm:text-4xl font-semibold tracking-tight text-white mb-3",children:"Static Malware Analyzer"}),e.jsx("p",{className:"text-base text-slate-300 max-w-2xl mx-auto",children:"Upload suspicious files for comprehensive static analysis — detect malware signatures, extract IOCs, and uncover hidden threats"})]}),e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:`relative rounded-[14px] border border-dashed transition-colors duration-300 ${X?"border-cyan-400/60 bg-cyan-500/10":"border-slate-700/60 bg-slate-900/60"}`,onDragEnter:k,onDragLeave:k,onDragOver:k,onDrop:ae,children:[e.jsx("input",{ref:Y,type:"file",onChange:ne,className:"hidden",id:"mal
1ware-file-input"}),e.jsxs("div",{className:"p-6 text-center sm:p-12",children:[e.jsx("div",{className:"mb-5 sm:mb-6",children:e.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-[10px] bg-cyan-500/15 ring-1 ring-cyan-400/40 sm:h-20 sm:w-20",children:e.jsx(be,{className:"w-8 h-8 text-cyan-200 sm:w-10 sm:h-10"})})}),e.jsx("h3",{className:"mb-2 text-lg font-semibold text-white break-all sm:text-xl",children:n?n.name:"Drop your file here for analysis"}),e.jsx("p",{className:"mb-6 text-sm text-slate-300 sm:text-base",children:n?`${(n.size/1024).toFixed(1)} KB — ready for analysis`:"Upload any suspicious file — executables, scripts, documents, and more"}),e.jsx("button",{onClick:oe,className:"w-full rounded-md bg-cyan-500 px-6 py-2.5 text-sm font-semibold text-slate-950 transition-colors hover:bg-cyan-400 sm:w-auto sm:px-8",id:"select-file-btn",children:"Select File"}),n&&!p&&!j&&e.jsxs("p",{className:"mt-4 text-sm text-emerald-300",children:[e.jsx(H,{className:"w-4 h-4 inline"})," File ready: ",n.name]})]}),e.jsxs("p",{className:"px-4 pb-4 text-center text-xs text-slate-500",children:[e.jsx(ye,{className:"w-3 h-3 inline"})," Note: Request sizes cannot exceed 4.5MB"]})]})}),e.jsx("div",{className:"mb-8",children:e.jsx(Te,{checks:m,allChecks:c,onCheckToggle:ie,onAllChecksToggle:re,subToolCosts:F,allChecksCost:D,costLoading:te,selectedCost:de,hasAnyCheck:u})}),n&&!j&&e.jsx("div",{className:"rounded-[14px] bg-slate-900/60 border border-slate-800/80 mb-8",children:e.jsxs("div",{className:"p-6",children:[e.jsx("h2",{className:"text-xl font-semibold text-white mb-3",children:"Ready to Analyze"}),e.jsxs("p",{className:"text-sm text-slate-300 mb-6",children:["Submit ",e.jsx("span",{className:"font-mono text-cyan-300",children:n.name})," for static malware analysis.",u?` Running ${c?"all":J} analysis check${J!==1||c?"s":""}.`:" Please select at least one analysis check above."," ","Results will appear on your ",e.jsx(y,{to:"/monitoring-hub",className:"text-cyan-300 hover:text-cyan-200",children:"Monitoring Hub"})," in about ",e.jsx("span",{className:"text-white",children:"30 seconds"}),"."]}),R&&e.jsx("div",{className:"mb-4 rounded-md border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-300",children:R}),e.jsx(Ne,{limitHit:Q}),e.jsxs("div",{className:"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("button",{onClick:ce,disabled:p||!u,className:`w-full rounded-md px-6 py-2.5 text-sm font-semibold transition-colors sm:w-auto ${p||!u?"bg-slate-700 text-slate-400 cursor-not-allowed":"bg-cyan-500 text-slate-950 hover:bg-cyan-400"}`,id:"submit-analysis-btn",children:p?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-slate-400/40 border-t-slate-200 rounded-full animate-spin"}),"Submitting…"]}):"Submit for Analysis"}),e.jsx("button",{onClick:$,className:"w-full rounded-md border border-slate-700 bg-slate-800/50 px-6 py-2.5 text-sm font-medium text-slate-200 transition-colors hover:border-slate-600 hover:bg-slate-800 sm:w-auto",id:"clear-btn",children:"Clear"})]})]})}),j&&e.jsx("div",{className:"rounded-[14px] bg-slate-900/60 border border-emerald-500/30 p-6 sm:p-8 mb-8",children:e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[e.jsx("div",{className:"w-12 h-12 rounded-[10px] bg-emerald-500/15 ring-1 ring-emerald-400/40 flex items-center justify-center flex-shrink-0",children:e.jsx(H,{className:"w-6 h-6 text-emerald-300"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-white mb-2",children:A?"Report ready":"Analysis submitted"}),e.jsx("p",{className:"text-sm text-slate-300 mb-4",children:A?e.jsxs(e.Fragment,{children:["Your file ",e.jsx("span",{className:"font-mono text-cyan-300 break-all",children:n?.name})," has been analyzed before, so your report is ",e.jsx("span",{className:"text-white",children:"ready now"})," — no new scan (or charge) was needed."]}):e.jsxs(e.Fragment,{children:["Your file ",e.jsx("span",{className:"font-mono text-cyan-300 break-all",children:n?.name})," has been submitted for static malware analysis. Results will be available on your ",e.jsx(y,{to:"/monitoring-hub",className:"text-cyan-300 hover:text-cyan-200",children:"Monitoring Hub"})," in approximately ",e.jsx("span",{className:"text-white",children:"30 seconds"}),"."]})}),f&&e.jsx("div",{className:"p-3 rounded-md bg-slate-900/80 border border-slate-800 mb-4",children:e.jsxs("p",{className:"text-sm text-slate-400",children:["Job ID: ",e.jsx("span",{className:"font-mono text-cyan-300",children:f})]})}),e.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row",children:[A&&f?e.jsx(y,{to:`/malware-report/${f}`,className:"inline-flex items-center justify-center rounded-md bg-cyan-500 px-6 py-2 text-sm font-semibold text-slate-950 transition-colors hover:bg-cyan-400",children:"View Report Now"}):e.jsx(y,{to:"/monitoring-hub",className:"inline-flex items-center justify-center rounded-md bg-cyan-500 px-6 py-2 text-sm font-semibold text-slate-950 transition-colors hover:bg-cyan-400",children:"Go to Monitoring Hub"}),e.jsx("button",{onClick:$,className:"rounded-md border border-slate-700 bg-slate-800/50 px-6 py-2 text-sm font-medium text-slate-200 transition-colors hover:border-slate-600 hover:bg-slate-800",children:"Analyze Another File"})]})]})]})}),e.jsx("div",{className:"rounded-[14px] bg-slate-900/60 border border-slate-800/80 p-6 mb-8",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(Ie,{className:"w-5 h-5 text-cyan-300 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-white mb-2",children:"How it works"}),e.jsxs("div",{className:"text-sm text-slate-300 space-y-2",children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-white font-medium",children:"File type detection"})," · identifies the true file type through deep inspection"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-white font-medium",children:"YARA matching"})," · scans against curated rules for known malware families"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-white font-medium",children:"IOC extraction"})," · pulls out IPs, domains, URLs, and other indicators of compromise"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-white font-medium",children:"String & entropy analysis"})," · detects obfuscation, packing, and suspicious content"]}),e.jsx("p",{className:"mt-3 text-xs text-slate-500",children:_?"Included in your Seat License.":"Free on the Free Tier: every check counts toward the same 30 scans a day."})]})]})]})}),e.jsx(Ae,{isAuthenticated:d,intro:"Prefer not to upload through the UI? You can also submit files via API.",api:{endpoint:"https://api.bluelanternsecurity.io/runs",method:"POST",description:"Send a multipart/form-data request with the file and the checks you want to run. Requires an API key from API Access.",body:{type:"form",f
1ields:[{key:"tool",value:"STATICMALWAREANALYZER"},{key:"file",value:"@your-file.bin",placeholder:!0},{key:"checkCost",value:"false"},{key:"all_checks",value:"true"}]},docsLink:{to:"/documentation/business-use-cases/automate-malware-analysis-through-our-api",label:"full API guide"}}})]}),e.jsx(ve,{open:se,onClose:()=>b(!1),toolName:"Static Malware Analyzer"})]})}export{Ze as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.