How I bypassed State Bank of India OTP.
The bank's transaction confirmation page accepted a client-controlled parameter that decided whether an OTP was required, and setting it to 'N' let a transaction complete without any OTP. An attacker with the victim's session could therefore move money without the second factor.
Published on hackernoon.com
Now a days One Time Password (OTP) are most popular Out-of-band feature of most of the banks through which a user make transaction and verify its identity using OTP sent to mobile registered with bank at the time of opening an account in the bank.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
State Bank of India (SBI) is described in the report as one of the most popular banks in India. The feature under examination is the One Time Password (OTP) step that most banks use as an out-of-band check: when a user makes a transaction, the bank sends an OTP to the mobile number registered with the bank at account opening, and the user enters it to verify identity and complete the transaction.
The researcher's target was the retail online banking site at https://retail.onlinesbi.com. The claim is that the OTP step could be skipped entirely, allowing a transaction of any amount to complete without entering an OTP.

Setup
The report does not describe any special accounts, roles, tools or software versions. The report does not describe any special accounts, roles, tools or software versions; it only describes making a transaction and reaching the OTP screen.
Finding it
After roughly an hour of looking at https://retail.onlinesbi.com, the researcher reached the last stage of a transaction, the point at which the user is sent to the One Time Password screen. Inspecting the POST request made at that stage revealed a parameter called smartotpflag, already set to the value Y:
smartotpflag=Y
The reasoning in the report is that smartotpflag controls OTP generation, with Y meaning yes, generate the OTP and send it to the registered mobile. That made the parameter interesting: if the server trusts a client-supplied value to decide whether an OTP is required, changing it should change the flow.
Exploitation
Step 1: Reach the OTP stage of a transaction
Start a transaction in the authenticated online banking session and proceed to the final stage, where the application presents the One Time Password screen.
Step 2: Intercept the final POST request
The request that submits the transaction carries the parameter smartotpflag with the value Y:
smartotpflag=Y
At this point the value is the one the application set itself; the researcher notes it was already Y initially.
Step 3: Change the value to N and submit
The researcher changed the value from Y to N:
smartotpflag=N
The result, as described, was that the transaction completed successfully without any OTP being entered. The report includes a proof of concept video showing a transaction of a lesser amount completing this way, and states that a later attempt with a transaction of Rs.60,000 also succeeded without an OTP.
Root cause
The report frames the issue as the server relying on the client-supplied smartotpflag parameter to decide whether an OTP is generated and required. The report's reasoning is that setting it to N meant no OTP was generated, and the transaction completed. In other words, the decision to enforce the second factor was taken from data the client controls, rather than from server-side state about the transaction.
Impact
The researcher completed a transaction without entering an OTP, defeating the out-of-band check meant to confirm the account holder's identity. The researcher demonstrated this with a transaction of a lesser amount and states that a transaction of Rs.60,000 also succeeded without an OTP. The report does not go into which accounts, roles or session conditions an attacker would need beyond being able to make the transaction request.
Fix
The report states that the vulnerability has already been patched, and that when the researcher checked again the bug no longer existed, roughly 1.5 months after reporting. The general fix implied by the finding is to stop trusting the client-supplied smartotpflag for the OTP decision and to enforce OTP generation and verification server-side for the transaction.
Timeline
The report gives the following sequence, starting 19th-Oct-2016:
- The researcher searched for SBI's security department but found nothing to contact.
- He searched for the chairman's number and contacted her; her assistant took the call and said there was no security team there and to contact somewhere else.
- Friends suggested reporting to CERT-India, the Indian government computer emergency team.
- He mailed all details of the vulnerability to CERT-India and directly to the chairman's mail address, found on the internet.
- The vulnerability had not been patched one month after reporting.
- He contacted CERT-India again about status; they replied that the details had been forwarded to SBI and would be fixed soon, depending on SBI.
- He checked again and the bug no longer existed, having been patched in approximately 1.5 months.
- As of the report, there had been no reply from CERT-India or the chairman about the status, and no acknowledgement or award.
Variants to test
These are general directions suggested by the finding, not things the report tested:
- Other boolean flags in final transaction requests. Look for parameters whose names suggest OTP, 2FA or verification control (for example a flag set to
Y/Nortrue/false) in the last POST of a payment flow. A positive result is the transaction completing after the flag is flipped, with no OTP entered. - Removing the parameter entirely. Drop the OTP-related parameter from the request and resubmit. A positive result is the server treating the absence as "no OTP required" rather than rejecting the request.
- Replaying a pre-OTP request. Capture the request from before the OTP step and resend it after the OTP stage. A positive result is the transaction being finalised without the OTP submission.
- Changing the OTP channel or destination fields. If the request carries a mobile number or channel selector, alter it and observe whether the OTP is still enforced. A positive result is a completed transaction without a code being delivered to the registered number.
- Response manipulation. If the OTP verification response is a simple success/failure field, try altering it client-side. A positive result is the application accepting the altered response and completing the transaction.
What happened, in plain words
This is the story of a security researcher, Neeraj Sonaniya, who found a way to skip the One Time Password (OTP) step in State Bank of India's online banking. The OTP is the short code a bank sends to your mobile phone when you make a transaction, so that even if someone has your password, they still cannot move your money without the code. The researcher found a parameter in the final transaction request, already set to Y, which the report reasons controls OTP generation, and changed it to N. When he changed it, the transaction went through without any OTP being entered. He demonstrated this with a small transaction and then with a transaction of Rs.60,000. The report says the issue has since been patched.

The background: what an OTP is and why it matters
Most banks use an OTP as an "out-of-band" check. "Out-of-band" simply means the check happens through a different channel from the one you are using to bank. You are logged in on a computer, but the code arrives on your phone. The idea is that an attacker who has stolen your password is probably not also holding your phone, so the second step stops them.
The report explains that the OTP is sent to the mobile number registered with the bank when the account was opened. When you make a transaction, you enter that code to prove your identity and complete the payment.
The question the researcher asked was simple: what if the OTP step can be bypassed? He describes finding a way to make a transaction of any amount without entering the OTP, at what he calls one of the most popular banks in India, State Bank of India (SBI).
The target and the setup
The researcher's target was the retail online banking site at https://retail.onlinesbi.com. "Retail" here means the site ordinary customers use, as opposed to a site for businesses.
The report does not describe any special accounts, roles, tools or software versions. The report does not describe any special accounts, roles, tools or software versions; it only describes making a transaction and reaching the OTP screen.
Finding it: the parameter that controls the OTP
After about an hour of looking around https://retail.onlinesbi.com, the researcher reached the last stage of a transaction, the point where the user is sent to the One Time Password screen. At that stage, he inspected the POST request that the browser sends.
A POST request is one of the ways a browser talks to a web server. When you fill in a form and press a button, the browser usually packages up what you typed and sends it to the server as a POST request. The server reads it and decides what to do next. You can see these requests using your browser's developer tools, which are built into every modern browser and let you watch the traffic between the page and the server.
Inside that request, the researcher found a parameter called smartotpflag, already set to the value Y:
smartotpflag=Y
A parameter is simply a named value sent along with a request, like a field on a paper form: a name (smartotpflag) and what you wrote in it (Y). Here the name suggests it is a flag, a switch that is either on or off, and the value Y suggests "yes".
The report's reasoning is that smartotpflag controls OTP generation, with Y meaning yes, generate the OTP and send it to the registered mobile. That made the parameter interesting. If the server trusts a value supplied by the browser to decide whether an OTP is required, then changing that value should change what happens next.
Exploitation: changing Y to N
Step 1: Reach the OTP stage of a transaction
Start a transaction in the logged-in online banking session and go through to the final stage, where the application shows the One Time Password screen. This is the normal path any customer takes, and it is where the interesting request is sent.
Step 2: Intercept the final POST request
The request that submits the transaction carries the parameter smartotpflag with the value Y:
smartotpflag=Y
At this point the value is the one the application set itself. The researcher notes it was already Y initially. "Intercept" means catching the request before it leaves the browser, so you can look at it and change it. You can do this with the browser's developer tools or with a proxy tool that sits between the browser and the server.
Step 3: Change the value to N and submit
The researcher changed the value from Y to N:
smartotpflag=N
If Y means "yes, generate an OTP", then N reads as "no, do not generate one". The result, as described, was that the transaction completed successfully without any OTP being entered. The report includes a proof of concept video showing a transaction of a lesser amount completing this way, and states that a later attempt with a transaction of Rs.60,000 also succeeded without an OTP.
A proof of concept (PoC) is a demonstration that a vulnerability really works, usually a recording or a set of steps someone else can follow to see the same result.
Why this works: the root cause
The report frames the issue as the server relying on the browser-supplied smartotpflag parameter to decide whether an OTP is generated and required. The report's reasoning is that setting it to N meant no OTP was generated, and the transaction completed.
In other words, the decision to enforce the second factor was taken from data the client controls, rather than from the server's own records about the transaction. "Client" means your side, the browser; "server" means the bank's computer. A useful comparison is a form where the customer ticks a box saying "I have paid the deposit" and the clerk accepts the tick without checking the bank account. The tick is just something the customer wrote; it proves nothing. Here, the browser was effectively telling the bank's server whether an OTP was needed, and the server believed it.
The behaviour is consistent with the flag being honoured as an instruction rather than validated against what the transaction actually requires.
Impact: what an attacker could do
The researcher completed a transaction without entering an OTP, defeating the out-of-band check meant to confirm the account holder's identity. The researcher demonstrated this with a transaction of a lesser amount and states that a transaction of Rs.60,000 also succeeded without an OTP.
The report does not go into which accounts, roles or session conditions an attacker would need beyond being able to make the transaction request.
The fix
The report states that the vulnerability has already been patched, and that when the researcher checked again the bug no longer existed, roughly 1.5 months after reporting. The general fix implied by the finding is to stop trusting the browser-supplied smartotpflag for the OTP decision and to enforce OTP generation and verification on the server side for the transaction.
Timeline
The report gives the following sequence, starting 19th-Oct-2016:
- The researcher searched for SBI's security department but found nothing to contact.
- He searched for the chairman's number and contacted her; her assistant took the call and said there was no security team there and to contact somewhere else.
- Friends suggested reporting to CERT-India, the Indian government computer emergency team.
- He mailed all details of the vulnerability to CERT-India and directly to the chairman's mail address, found on the internet.
- The vulnerability had not been patched one month after reporting.
- He contacted CERT-India again about status; they replied that the details had been forwarded to SBI and would be fixed soon, depending on SBI.
- He checked again and the bug no longer existed, having been patched in approximately 1.5 months.
- As of the report, there had been no reply from CERT-India or the chairman about the status, and no acknowledgement or award.
Variants to test
These are general directions suggested by the finding, not things the report tested:
- Other boolean flags in final transaction requests. Look for parameters whose names suggest OTP, 2FA or verification control (for example a flag set to
Y/Nortrue/false) in the last POST of a payment flow. A positive result is the transaction completing after the flag is flipped, with no OTP entered. - Removing the parameter entirely. Drop the OTP-related parameter from the request and resubmit. A positive result is the server treating the absence as "no OTP required" rather than rejecting the request.
- Replaying a pre-OTP request. Capture the request from before the OTP step and resend it after the OTP stage. A positive result is the transaction being finalised without the OTP submission.
- Changing the OTP channel or destination fields. If the request carries a mobile number or channel selector, alter it and observe whether the OTP is still enforced. A positive result is a completed transaction without a code being delivered to the registered number.
- Response manipulation. If the OTP verification response is a simple success/failure field, try altering it client-side. A positive result is the application accepting the altered response and completing the transaction.
Glossary
- OTP (One Time Password): a short code, valid once, sent to your registered mobile phone to confirm a transaction.
- Out-of-band check: a verification step that happens through a different channel from the one you are using, such as a code arriving on your phone while you bank on a computer.
- State Bank of India (SBI): the bank described in the report as one of the most popular banks in India.
- Retail online banking: the website ordinary customers use to manage their accounts and make transactions.
- POST request: a message a browser sends to a web server, usually carrying the data you filled in on a form.
- Parameter: a named value sent with a request, like a field on a form, with a name and a value.
- Flag: a parameter that acts as a switch, usually on or off, such as
Y/Nortrue/false. smartotpflag: the parameter found in the final transaction request, set toYby the application, which the researcher changed toN.- Client: your side of the connection, normally the browser.
- Server: the bank's computer that receives requests and decides what to do.
- Intercept: to catch a request before it leaves the browser so you can inspect or change it.
- Proxy tool: software that sits between the browser and the server and lets you view and modify traffic.
- Developer tools: features built into browsers for inspecting page traffic and requests.
- Proof of concept (PoC): a demonstration that a vulnerability works, often a video or a set of reproducible steps.
- Root cause: the underlying reason a vulnerability exists, as opposed to its visible symptom.
- Second factor: an additional proof of identity beyond a password, such as an OTP.
- Patch: a fix applied to software to close a vulnerability.
- CERT-India: the Indian government computer emergency response team, which coordinates reports of security problems.
- Boolean: a value that can only be true or false, or here yes or no (
Y/N). - 2FA (two-factor authentication): logging in or confirming an action using two different kinds of proof, such as a password plus an OTP.
- Replay: resending a request that was captured earlier.
- Response manipulation: changing the server's reply on the client side to see whether the application accepts the altered answer.