Tampering
In a KYC/KYB system, "document transformations" are high-risk moments. Tampering often occurs when a user converts a file (e.g., "Print to PDF") or edits it using consumer software. To maintain financial-grade integrity, you must verify both the Digital Forensics (the file's DNA) and the Visual Consistency (the file's appearance).
Here is the checklist of what your AdonisJS backend and Vue frontend should verify to detect tampering.
1. Metadata Analysis (The "Digital DNA")
Metadata is usually the first thing a fraudster forgets to scrub. Your backend should parse the file's properties for "Red Flags."
Software "Producers": Genuine bank statements or government PDFs are generated by enterprise systems (e.g., Oracle Financials, Finacle, IText). If the metadata shows "Adobe Photoshop," "Canva," "SmallPDF," or "Preview," it is a high-probability tamper.
Timestamp Mismatches: On a genuine document, the
Creation DateandModification Dateshould be identical or very close. If the modification date is weeks after the creation date, the file has been opened and re-saved.Author/Usernames: Check if the PDF "Author" field matches the customer's computer name or, worse, a known "Document Template" seller.
2. PDF Structure & Font Forensics
Fraudsters often "layer" new text over an existing document.
Font Inconsistencies: Banks use highly consistent typography. If the "Balance" amount uses a slightly different font weight, size, or spacing than the "Transaction" text, it's a "Copy-Paste" job.
Non-Embedded Fonts: If a PDF contains fonts that aren't "Embedded" or "Embedded Subset," it often means the text was added by a local machine rather than the bank's server.
Invisible Layers: Sophisticated tools can detect "Hidden Text" or white boxes placed over original numbers. In your Vue viewer, you can implement a "Scan for Hidden Layers" toggle that highlights overlapping elements.
3. Visual & Forensic Image Checks
For scanned IDs (KYC) or Photos of documents, you need to check the Pixel Integrity.
Pixel Noise (Compression Artifacts): When an image is edited (e.g., changing a "3" to an "8"), the "noise" or grain around that specific character will be different from the rest of the page.
Copy-Move Detection: Look for identical patterns in the "noise." Fraudsters often clone a "0" from one part of a bank statement and paste it into the "Total" column.
Edge Detection: Check the edges of the photo on an ID card. If the pixels around the headshot are "too sharp" compared to the rest of the card, the photo was digitally swapped.
4. The "Four-Eyes" Verification Checklist
In your Vue FE, provide the Analyst with a Tamper Checklist that they must manually confirm:
Checkpoint
What to look for
Logic Check
Do the line items actually sum up to the "Total" shown?
Logo Quality
Is the bank logo blurry or pixelated compared to the text?
Alignment
Are the numbers in the "Amount" column perfectly vertically aligned?
Template Match
Does this statement match the known layout for "Chase Bank" in 2026?
5. Implementation in AdonisJS
You can use a Node.js library like pdf-lib or exiftool-vendored to extract this data during the upload process.
TypeScript
Summary for your KYC Workflow
Every document transformation should be logged in your Audit Trail with its original hash (SHA-256). If a user uploads a file, and then "re-uploads" a corrected version, the system should flag it for a "Manual Forensic Review" by a Senior Compliance Officer.
In a KYC/KYB system, the most common "red flag" is a mismatch between the Creation Date (when the bank system generated the PDF) and the Modification Date (when the user opened it in Acrobat/Photoshop to change a number).
To do this in AdonisJS, you should use exiftool-vendored. It is the gold standard for reading deep metadata that simple libraries often miss.
1. Install the Forensic Tool
Bash
2. Create a Forensic Service
This service will take the uploaded file from your Adonis controller and return a "Risk Score."
TypeScript
3. Integrate into your Adonis Controller
When the user uploads the document via your Vue frontend, the controller runs the check before saving the case.
TypeScript
4. Visualizing the Result in Vue
On your "Checker" screen (the Analyst view), you can now highlight these flags.
Code snippet
Why this works:
Hard to bypass: A fraudster would need to use command-line tools to manually rewrite the EXIF
ModifyDateto match theCreateDateexactly. Most scammers don't go that deep.Modular: You can add a new check (like "Check for low-resolution logos") to the
analyzemethod without touching your frontend.Auditable: Because the
redFlagsare stored in your DB, you can prove to a financial regulator why you rejected a specific customer.
Would you like me to show you how to add a "Pixel Consistency" check? This detects if a small area of an image (like a name or amount) has been altered by looking for "noise" variations.
Last updated