yogeshojha / rengine

reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with minimal configuration and with the help of reNgine's correlation, it just makes recon effortless.
https://yogeshojha.github.io/rengine/
GNU General Public License v3.0
7.19k stars 1.1k forks source link

DataTables warning: table id=list_target_table - Ajax error #1295

Open m0ng3sh3ll opened 4 days ago

m0ng3sh3ll commented 4 days ago

Is there an existing issue for this?

Current Behavior

When invoking the function to list targets, this error is shown:

DataTables warning: table id=list_target_table - Ajax error

This happened after updating to the new version 2.1.0 using update.sh.

Expected Behavior

List targets from project

Steps To Reproduce

  1. Run update.sh;
  2. Create new project;
  3. Insert new target;
  4. When invoking the function to list targets, this error is shown.

Environment

- reNgine: 2.1.0
- OS: Ubuntu 24.04 LTS
- Python: 3.12.3
- Docker Engine: 26.1.2 
- Docker Compose: v2.27.0
- Browser: Chrome and Firefox

Anything else?

No response

github-actions[bot] commented 4 days ago

👋 Hi @m0ng3sh3ll, Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.

haimtoledano commented 3 days ago

same here

yogeshojha commented 13 hours ago

@haimtoledano @m0ng3sh3ll When does this happen? I am trying to replicate and do not see this happening on my local instance.

If I understand correctly when you go to targets section /target/project_name/list/target is this where datatable warning pops up?

m0ng3sh3ll commented 13 hours ago

Hi, it's correct.

I try install from zero, create a new project, add one target and the problem continues.

yogeshojha commented 13 hours ago

Thank you for the prompt update @m0ng3sh3ll

Do you mind pasting console logs here?

Go as usual where error is there, right click, inspect and go to console tab. Thsi will help me debug the issue.

Thanks

m0ng3sh3ll commented 13 hours ago

Following the console log:

First error 500:

GET scheme https host localhost filename /api/scan_status/ project recon Address 127.0.0.1:443 Status 500 VersionHTTP/2 Transferred400 B (145 B size) Referrer Policysame-origin DNS ResolutionSystem

And the second error 500:

scheme https host localhost filename /api/listTargets/ format datatables slug recon draw 1 columns[0][data] id columns[0][name]

columns[0][searchable] true columns[0][orderable] false columns[0][search][value]

columns[0][search][regex] false columns[1][data] id columns[1][name]

columns[1][searchable] true columns[1][orderable] true columns[1][search][value]

columns[1][search][regex] false columns[2][data] name columns[2][name]

columns[2][searchable] true columns[2][orderable] true columns[2][search][value]

columns[2][search][regex] false columns[3][data] description columns[3][name]

columns[3][searchable] true columns[3][orderable] false columns[3][search][value]

columns[3][search][regex] false columns[4][data] id columns[4][name]

columns[4][searchable] true columns[4][orderable] true columns[4][search][value]

columns[4][search][regex] false columns[5][data] start_scan_date columns[5][name]

columns[5][searchable] true columns[5][orderable] true columns[5][search][value]

columns[5][search][regex] false columns[6][data] id columns[6][name]

columns[6][searchable] true columns[6][orderable] false columns[6][search][value]

columns[6][search][regex] false columns[7][data] organization columns[7][name]

columns[7][searchable] true columns[7][orderable] true columns[7][search][value]

columns[7][search][regex] false columns[8][data] most_recent_scan columns[8][name]

columns[8][searchable] true columns[8][orderable] true columns[8][search][value]

columns[8][search][regex] false columns[9][data] insert_date columns[9][name]

columns[9][searchable] true columns[9][orderable] true columns[9][search][value]

columns[9][search][regex] false columns[10][data] insert_date_humanized columns[10][name]

columns[10][searchable] true columns[10][orderable] true columns[10][search][value]

columns[10][search][regex] false columns[11][data] start_scan_date_humanized columns[11][name]

columns[11][searchable] true columns[11][orderable] true columns[11][search][value]

columns[11][search][regex] false order[0][column] 1 order[0][dir] desc start 0 length 20 search[value]

search[regex] false _ 1720147897509 Address 127.0.0.1:443 Status 500 VersionHTTP/2 Transferred400 B (145 B size) Referrer Policysame-origin DNS ResolutionSystem

yogeshojha commented 13 hours ago

@m0ng3sh3ll is this from console tab? Very weird to have so

I am trying to see the logs from this console tab. image

m0ng3sh3ll commented 4 hours ago

Following the screenshot from console for better visualization:

image

yogeshojha commented 3 hours ago

@m0ng3sh3ll Thank you for the screenshot.

There are two things going wrong here, your scan_status endpoint also has 500 error. weird to have.

I believe issue isnt directly with datatable, rather scan_status api, when you click on GET /api/scan_status what does it show?

yogeshojha commented 3 hours ago

@m0ng3sh3ll what happens when you visit these urls?

https://127.0.0.0/api/scan_status/?project=recon

or

https://127.0.0.0/api/listTargets/?format=datatables&slug=recon&draw=1&columns%5B0%5D%5Bdata%5D=id&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=false&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=id&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=name&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=description&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=false&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=id&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=true&columns%5B4%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B4%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B5%5D%5Bdata%5D=start_scan_date&columns%5B5%5D%5Bname%5D=&columns%5B5%5D%5Bsearchable%5D=true&columns%5B5%5D%5Borderable%5D=true&columns%5B5%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B5%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B6%5D%5Bdata%5D=id&columns%5B6%5D%5Bname%5D=&columns%5B6%5D%5Bsearchable%5D=true&columns%5B6%5D%5Borderable%5D=false&columns%5B6%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B6%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B7%5D%5Bdata%5D=organization&columns%5B7%5D%5Bname%5D=&columns%5B7%5D%5Bsearchable%5D=true&columns%5B7%5D%5Borderable%5D=true&columns%5B7%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B7%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B8%5D%5Bdata%5D=most_recent_scan&columns%5B8%5D%5Bname%5D=&columns%5B8%5D%5Bsearchable%5D=true&columns%5B8%5D%5Borderable%5D=true&columns%5B8%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B8%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B9%5D%5Bdata%5D=insert_date&columns%5B9%5D%5Bname%5D=&columns%5B9%5D%5Bsearchable%5D=true&columns%5B9%5D%5Borderable%5D=true&columns%5B9%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B9%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B10%5D%5Bdata%5D=insert_date_humanized&columns%5B10%5D%5Bname%5D=&columns%5B10%5D%5Bsearchable%5D=true&columns%5B10%5D%5Borderable%5D=true&columns%5B10%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B10%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B11%5D%5Bdata%5D=start_scan_datehumanized&columns%5B11%5D%5Bname%5D=&columns%5B11%5D%5Bsearchable%5D=true&columns%5B11%5D%5Borderable%5D=true&columns%5B11%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B11%5D%5Bsearch%5D%5Bregex%5D=false&order%5B0%5D%5Bcolumn%5D=1&order%5B0%5D%5Bdir%5D=desc&start=0&length=20&search%5Bvalue%5D=&search%5Bregex%5D=false&=1720183870575

m0ng3sh3ll commented 3 hours ago

For both cases, the return is 500:

image

image

yogeshojha commented 3 hours ago

@m0ng3sh3ll Thank you for verifying.

looks like #1297 and this are related. Let me try to debug update as you said from 2.0.X to 2.1.0