Fraud and identity

Camera injection vs deepfake detection

Why camera injection, liveness and deepfake detection solve different problems in mobile onboarding, who owns each layer and how to test them apart.

They are different problems because they look at different things. Camera injection detection asks whether the frames reached your app from the phone’s physical camera or were fed in by a virtual camera, a hook or an emulator. Liveness asks whether a real person was in front of the lens. Deepfake detection asks whether the face itself was synthesised or swapped. Identity verification then matches that face to a document. A remote onboarding flow needs each answer from the layer that can give it. This article covers Android and iOS apps; each platform has its own capture risks.

Definitions

Three kinds of attack reach a selfie or document step, and they differ in where the deception happens: before the lens, at the lens, or in the content itself.

Capture-path manipulation

  • The real camera is bypassed
  • Frames come from a file, a hook or an emulator
  • The content can be flawless because it was chosen in advance
  • Only the app can see the route the frames took

Presentation and generated content

  • The real camera is used, or its route is trusted
  • The lens sees a photo, a screen, a mask or a synthetic face
  • The deception is in what the frames show
  • Content analysis in the identity layer judges it
Two families of attack, two different places to look. A flow that watches only one side leaves the other open.

Capture-path manipulation

The attacker never points a camera at anything. They replace the source: a virtual camera that presents a video file as the front camera, a hooking framework that swaps frames inside the app’s process, an emulator that feeds prepared footage, or a modified copy of the app with its capture module removed. The pixels may be flawless, because they were chosen in advance.

Presentation attacks and liveness

Here the real camera is used, but it sees a printed photo, a phone screen replaying a video, or a mask. Liveness checks look for depth, texture, motion or response to a prompt to tell a present person from an artefact.

Generated content

Deepfake detection analyses the image or video for signs of synthesis, face swapping or reenactment. It can run on frames from any source, which is its strength and its weakness: it judges content without knowing how that content arrived.

A deepfake delivered through an injected stream never has to fool the lens. It only has to fool the model that judges the frames.

Who owns which layer

A remote onboarding flow passes frames through several components. Each can answer one question well and none can answer all of them.

  1. Camera

    Produces frames, or is bypassed by an injected source.

  2. Mobile app

    Checks the capture path while the camera is open and attaches the result.

  3. Identity service

    Judges liveness, synthetic content and the match with the document.

  4. Your backend

    Combines every result with device and account history and decides.

The capture flow and the question each component answers. The backend is the only place that sees every answer together.
QuestionWhere it is answeredEvidence it usesWhat it cannot see
Did the frames come from the physical camera?Mobile app, at captureCamera source, process integrity, device stateWhether the face is real or matches a document
Is a live person present?Identity verification serviceMotion, depth, texture, challenge responseWhether the stream was injected upstream
Is the face synthetic or swapped?Identity verification service or a specialist modelVisual artefacts in framesHow the frames reached the app
Does the face match the document?Identity verification serviceDocument data and face comparisonCapture path and device state
Should this onboarding proceed?Your backendAll of the above, plus device and account historyNothing it is not sent

The app is the only component that sits next to the camera, so it is the only place that can vouch for the capture path. Your backend is the only component that sees every result together, so the final decision belongs there, not in the app and not in any single service.

Testing each layer on its own terms

A single test run that mixes every attack hides which layer did the work. Keep the evaluations separate, and write down the pass condition before the first test.

TestAttack presentedLayer under testPass condition
InjectionPrepared footage through a virtual camera, a hook in the capture code or an emulatorMobile appThe session is flagged, whatever the footage shows
PresentationPrinted photos, screens and masks in front of a real camera on genuine devicesLivenessThe attempt is rejected
Synthetic contentGenerated or swapped faces through a genuine camera pathContent analysisThe face is flagged, independent of the capture result
MatchingGenuine people with mismatched documentsVerificationThe pairing is rejected
RegressionThe genuine-user journey on supported devicesEvery layerGenuine users complete onboarding

Record results per layer and per platform. A strong liveness score tells you nothing about injection resistance, and the reverse.

  • Agree which team owns each layer and each pass condition.
  • Run injection tests on Android and on iOS, and record them separately.
  • Repeat presentation and synthetic tests after each identity service update.
  • Repeat the genuine-user journey after each app release.
  • Confirm that the capture-integrity result reaches the backend with the media.

How Otukan protects the capture path

Otukan protects the part only the app can protect. While the camera is open, it detects frames that do not come from the physical camera, virtual camera sources, instrumentation attached to camera and image-processing code, and emulators feeding prepared video. Frames captured while hooks are present can be marked untrusted or discarded, and root indicators on Android and jailbreak indicators on iOS add context to the result. It confirms that the app’s code and signing identity match your release, so a copy with a replaced capture module stands out. The capture-integrity result travels with the media to your backend, where you set the response per flow, including routing to manual review. Checks are built separately for Android and iOS and cover Flutter and React Native apps, and Otukan runs joint positive, negative and regression tests with your team and identity provider. Protection fits your existing build and release pipeline, and your signing keys stay with your team.

The product control is covered on mobile camera injection detection, and the wider onboarding and payment fraud controls on mobile fraud prevention.

Common questions

  • If our identity provider has deepfake detection, do we still need camera integrity?

    Yes. Content analysis judges what is in the frames. It works best when it knows the frames came from the phone's own camera, because an attacker who can inject video can also replay clips tuned to pass a specific model. Capture integrity exposes that route in the app, flags sessions that use it and sends the capture-integrity result with the media to your backend, which combines it with the identity service's results.

  • Is liveness the same as deepfake detection?

    No. Liveness, or presentation attack detection, asks whether a live person is in front of the camera rather than a photo, screen or mask. Deepfake detection asks whether the face in the stream was synthesised or swapped. A deepfake shown through an injected stream never needs to beat a presentation test at the lens, which is why the layers must be evaluated separately.

  • Does capture integrity work the same on Android and iOS?

    No. Android and iOS reach the camera through different frameworks and face different injection routes, so a result on one platform says nothing about the other. Otukan builds its capture-integrity checks separately for each platform.

Keep reading

Trust the frames before you judge the face

Tell us your platforms, the framework of your onboarding app and where selfie or document capture happens in the flow. We never ask for binaries, signing keys or customer images.

Or request a technical demo