SecurityFTW / cs-suite

Cloud Security Suite - One stop tool for auditing the security posture of AWS/GCP/Azure infrastructure.
GNU General Public License v3.0
1.13k stars 217 forks source link

how to open html file after the report is generated #8

Closed Leectan closed 5 years ago

Leectan commented 6 years ago

After the report is generated, does it automatically export it to the default browser or it has to be manually open? If so, how? Any suggestion or help is appreciated here.

shivankar-madaan commented 6 years ago

Hi Yes the report automatically opens to the default browser,if it hasn't you can open it from this path cs-suite/reports/aws_audit/<account_name>/<timestamp>/finalreport.html Could you let us know your default browser,as we have tested with Google chrome.We can try resolving if the case is different. Also just for the heads up,if development branch has been cloned,then it wouldnt work as work is still in progress on that branch.

Leectan commented 6 years ago

I have tried the path but unfortunately it says "Your file was not found". The report does not automatically show up in browser and I've made sure I pulled it from the stable master branch. Any Advise?

shivankar-madaan commented 6 years ago

Could you share what was the command,you used to run the cs-suite

Leectan commented 6 years ago

Sure, I ran the python cs.py in the terminal as usual.

1 2 4 3 screen shot 2018-03-09 at 11 57 08 am
Leectan commented 6 years ago

Like I said, it did not automatically pop up the browser neither does the manual process works.

shivankar-madaan commented 6 years ago

Is it possible that you can navigate to that directory and check what files are available under that directory. cs-suite/reports/aws_audit/<account_name>/<timestamp>/final_report. This can help us debug more into this,currently I think this is the way we can go ahead and find the issue. Could also let me know what files are present under that directory.

Leectan commented 6 years ago
1 2 3
shivankar-madaan commented 6 years ago

Are you running on your local machine or is this a ssh session?

Leectan commented 6 years ago

ssh session. ec2 ubuntu server.

shivankar-madaan commented 6 years ago

Oh then you would have copy the file/report back to your own localhost/machine via scp to view it in the browser

Leectan commented 6 years ago

yes, I spent the whole night try to figure that out. I scp the whole final report folder, but when open the file, it says the objection above, "Your File Was Not Found"

shivankar-madaan commented 6 years ago

Or another way to go around this is,you could configure the aws keys on localhost/machine itself with aws configure,and then run cs.py,the report would generate on your localhost itself and by default it would open in your own browser

Leectan commented 6 years ago

ok Thanks shivankar. Let me give that a try.

Leectan commented 6 years ago

Ok, after the local test, I was able to run and generate the file, but for some reason, Scout2 report is not showing. I ran it 2 times and the issue still persist.

2 1
Leectan commented 6 years ago

and IP audit as well.

3
shivankar-madaan commented 6 years ago

Hey Are u still getting this error? sorry about the late response,was afk. Please let us know,we'll get this debugged

jayeshchauhan commented 6 years ago

Hi Leectan,

If you haven't run a successful IP audit(Using CS-Suite) in past, the folder "local_audit" doesn't get created. So, it will always give this error of not found. For AWS report, can you cd into the directory which has cs-suite and give us the directory listing result screenshot. Also, do the same for the report folder, cd into reports folder and give us a directory listing image. If you keep finding expected folders, reach to _cs-suite/reports/aws_audit///finalreport and give us a screenshot for the directory listing of _finalreport.

Leectan commented 6 years ago
1 screen shot 2018-03-22 at 10 26 51 am 2
shivankar-madaan commented 6 years ago

So is the issue currently only with Scout2 ?

Leectan commented 6 years ago

above are the files and directory for the cs-suite. I have tested on 2 aws accounts, one was able to generate the scout2 report, but not the other. Ip-audit could not be generated for neither accounts.

shivankar-madaan commented 6 years ago

IP audit ,basically needs to run separately from AWS audit For Linux box u run it as python cs.py -aip "host_ip" -pem "pem_file_location" (this will try logging in as default ec2-user)

Leectan commented 6 years ago

@shivankar-madaan both scout2 and Ip audit. @jayeshchauhan, exactly, ip-audit was never generated, any suggestion to fix this type of issue?

Leectan commented 6 years ago

@shivankar-madaan, so I should run the IP audit on ec2 server rather than my local machine? does it map the entire aws account or just specific VPC or ec2 instance?

shivankar-madaan commented 6 years ago

You can run the IP audit on your local machine as well on your ec2-server Just make sure that you have provided the right aws-region(when aws configure was run)

Leectan commented 6 years ago

suggestion on running ip audit locally with Unix instead of linux box.

shivankar-madaan commented 6 years ago

it should work with Unix as well So we have parameters option as -aip (audit_ip) which is manadatory -u user-name,if you want to use any other user than ec2-user(which is default) -pem pem file location -p password,this is basically if you use password along with the pem file,or if you use just the password and not the pem file

Leectan commented 6 years ago
1
Leectan commented 6 years ago
2
shivankar-madaan commented 6 years ago

Could you please try doing a scp manually as well I mean the command under the line LINUX BOX FOUND!!! lets see what error we get and we can then go ahead based on that

shivankar-madaan commented 5 years ago

Hey please let us know if you need any help on this, or if we could close this

shivankar-madaan commented 5 years ago

please re-open , if there's any issue on the same still exists.

devendrab commented 5 years ago

I am facing the same issue while running cs audit for AWS. It don't generate the Scout2 report and its directory as "report/AWS/aws_audit///scout2_report" I get following error while accessing Scout2 reports.


Error response Error code 404.

Message: File not found.

Error code explanation: 404 = Nothing matches the given URI.

I tried to run cs-suit in AWS ec2 instance with Ubuntu[16.04, 18.04], CentOS 7 and Amzon AMI. All three instance had same results. No Scout2 reports are generated using cs.py.

However when I individually run Scout2 from cs-suite/tools/Scout2/Scout2.py" it generates the report in "cs-suite/tools/Scout2/scout2-report/report.html"