fame icon indicating copy to clipboard operation
fame copied to clipboard

Hash submission to API send html code instead of json

Open ameygat opened this issue 8 years ago • 0 comments

Description

[Please provide a description of the issue encountered] When submiting a Hash as analysis through API if reulstant hash file is not found FAME returns bit html code instead of json reply.

Steps to Reproduce

[Describe the steps to reproduce]

headers = {'Accept': 'application/json',
 'X-API-KEY': 'my_api_key'}

params2 = {
    'options[allow_internet_access]':'on',
    'options[analysis_time]':"300", 'groups':'*','options[tag]':'Honeypot','hash':'8971fc79d73e2541cf5a27e8ad5e971c'
}

r2 = requests.post(submit_url,data=params2,headers=headers,verify=False)

Expected behavior

[How are you expecting the application to behave?] I was expecting json reply similar to u'{"analysis": {"support_files": {}, "logs": ["2017-07-25 11:23: debug: Trying to queue module \'bamfdetect\'", "2017-07-25 11:23: debug: Trying to queue module \'eml\'", "2017-07-25 11:23: debug: Trying to queue module \'office_macros\'", "2017-07-25 11:23: debug: Trying to queue module \'pdf\'", "2017-07-25 11:23: debug: Trying to queue module \'zip\'", "2017-07-25 11:23: debug: Trying to queue module \'fireeye_ax\'", "2017-07-25 11:23: debug: Trying to queue module \'virustotal_report\'", "2017-07-25 11:23: debug: Trying to queue module \'payload_security\'"], "extractions": [], "results": {}, "module": null, "date": {"$date": 1500981796720}, "file": {"$oid": "59772a24e6c7db09969802f5"}, "iocs": [], "executed_modules": [], "probable_names": [], "extracted_files": [], "status": "pending", "tags": [], "groups": ["*"], "pending_modules": ["fireeye_ax", "virustotal_report", "payload_security"], "analyst": {"$oid": "59663083e6c7db099698027a"}, "waiting_modules": [], "canceled_modules": [], "threat_intelligence": {}, "generated_files": {}, "_id": {"$oid": "59772a24e6c7db09969802f6"}, "options": {}}}'

Actual behavior

[How is the application behaving? (include any stacktraces, logs, screenshots, etc.)] API call returned following html

u'<!doctype html>\n\n

\n\t\n\t\n\t\n\n\tFAME\n\n\t<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />\n \n\n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n <link href='https://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>\n \n\n \n \n\n \n \n\t\n\n \n\t\n \n\n \n \n\n \n \n\n \n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n\n\n
\n \n\n
\n \n\n\n
\n
\n \n \n \n\n \n
\n\t
\n
\n
\n

Submit a new file

\n

And start an analysis

\n
\n
\n
\n
\n \n
\n\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n\n
\n \n
\n\n
\n \n \n
\n\n \n\n
\n \n
\n
\n
\n
\n
\n
\n\n\n\n\n\n
\n\n\n
\n\n\n\n\n\n
\n
\n\n \n\n\n\n \n \n \n\n\n\n'

Debug

[Include the output of utils/run.sh utils/troubleshoot.py]

ameygat avatar Jul 25 '17 11:07 ameygat

Fixed by https://github.com/certsocietegenerale/fame/pull/86

Augustin-FL avatar Sep 19 '22 16:09 Augustin-FL