How to use Patator to brute force HTTP Basic Auth - passwords

I'm doing some password cracking experiments with different tools. I've a local set up within VMWare Workstation. I have a website protected by HTTP Basic Auth (A dialog pops up when i browse to it).
I'm struggling with the syntax of Patator though - I cant make it brute force the website (tools like Ncrack and Hydra worked OK). I have used it for SSH so i know the tool works, just can't figure the command for HTTP Basic Auth
patator http_fuzz auth_type=basic url=http://10.1.1.15 user_pass=FILE0:FILE0 0=./passwd_lists/user_pass.txt -x ignore:code=401
Where user_pass.txt contains a 'username':'password' separated by a colon
Basic Auth password is '123' and the user_pass.txt contain all permutations from 000 - 999, the username is consistent throughout. I can see Patator making 1000 attempts however they all fail with a HTTP 401
11:26:27 patator INFO - 401 672:456 0.001 | molly:969 | 970 | HTTP/1.1 401 Unauthorized
11:26:27 patator INFO - 401 672:456 0.001 | molly:979 | 980 | HTTP/1.1 401 Unauthorized
11:26:27 patator INFO - 401 672:456 0.001 | molly:989 | 990 | HTTP/1.1 401 Unauthorized
11:26:27 patator INFO - 401 672:456 0.001 | molly:999 | 1000 | HTTP/1.1 401 Unauthorized
11:26:28 patator INFO - Hits/Done/Skip/Fail/Size: 1000/1000/0/0/1000, Avg: 732 r/s, Time: 0h 0m 1s
I think i have the command syntax incorrect, any help really appreciated.
Thanks

Turns out i had the syntax incorrect, my user name and password were colon separated in one file, so the syntax should be
patator http_fuzz auth_type=basic url=http://10.1.1.15 user_pass=FILE0 0=./passwd_lists/user_pass.txt -x ignore:code=401
The difference being the single reference to to FILE0

Related

Springboot Webflux accesslog: What are the two numbers at the end please?

Small question regarding how to interpret a SpringBoot Webflux app access log please.
Currently, in my logs, more precisely access logs, I can see:
2021-07-31 13:46:19.913 INFO [service,,] 10 --- [or-http-epoll-1] reactor.netty.http.server.AccessLog : ip - - [31/Jul/2021:13:46:19 +0000] "GET /health HTTP/1.1" 200 3349 6
2021-07-31 13:47:18.531 INFO [service,,] 10 --- [or-http-epoll-2] reactor.netty.http.server.AccessLog : ip - - [31/Jul/2021:13:47:18 +0000] "GET /health/liveness HTTP/2.0" 200 3312 8
2021-07-31 13:47:33.347 INFO [service,,] 10 --- [or-http-epoll-2] reactor.netty.http.server.AccessLog : ip - - [31/Jul/2021:13:47:33 +0000] "GET /health HTTP/1.1" 200 3349 11
I understand the 200 is probably my http response, I return http 200.
But I am having a hard time understanding what are the last two numbers please.
3349 6
3312 8
3349 11
Any help?
Thank you
It does depend on log format definition, but it looks like the larger number is response size in bytes and the smaller is processing time of the request in ms.
I'll look at documentation to see where I'd expect to find the log format definition for a spring webflux app. I'd expect the format to be defined in a similar way to httpd access logs ( documentation for those is at https://httpd.apache.org/docs/2.4/logs.html)

SIM800l Httpaction. Can't get 0,200 or 0,200

I'm playing with HTTP GET and POST methods and I have problem. My problem is next one: Last week my GET method was work perfect and then suddenly stop working. Problem occur because MCU can't got response in this format: 0,200,xxx. Code is identical 100%. MCU always got this response: 0,603 (DNS error). Next commands and responses I send/receive to/from SIM800l:
Signal strength | at command: AT+CSQ | response +CSQ: 20,0
Full functionality | at command: AT+CFUN=1 | response OK
If bearer is open send | at command: AT+SAPBR=0,1 | response OK
Otherwise do nothing
Set bearer for gprs | at command: AT+SAPBR=3,1,"CONTYPE","GPRS" | response OK
Set APN | at command: AT+SAPBR=3,1,"APN","internet" | response OK
Set USERNAME | at command: AT+SAPBR=3,1,"USER","telenor" | response OK
Set PASSWORD | at command: AT+SAPBR=3,1,"PWD","gprs" | response OK
Is bearer opened | at command: AT+SAPBR=2,1 | response +SAPBR: 1,3,"0.0.0.0"
Open bearer | at command: AT+SAPBR=1,1 | response OK
Init http | at command: AT+HTTPINIT | response OK
Enable SSL | at command: AT+HTTPSSL=1 | response OK
Set profile identifier | at command: AT+HTTPPARA="CID",1 | response OK
Set url | at command: AT+HTTPPARA="URL","https://mondo.rs/" | response OK
Set GET action | at command: AT+HTTPACTION=0 | response 0,603,0
When I got this response I send again same at command, and result is same (sometimes response from SIM800l is 0,604,0). I use laboratory psu ( which is stable and enough for SIM800l).
Stiil I can send SMS, read all messages,.. without problem. What can be problem?
I find solution for problem, mainly sim800l need firmware upgrade.
Follow steps:
Download SIM800_Series_download_Tools_Customer_v1.19.rar(for win) https://simcom.ee/documents/?dir=SIM800x and driver MTK_USB_DRIVER.rar
Look what firmware is currently on sim800 with AT+CGMR, my firmware was 1418B02SIM800L24. Here B02 is interested for us.
sim800l have 2 different hardware models L16 and L24. If your firmware version have L16 on the end of firmware mark download new firmware from https://simcom.ee/documents/?dir=SIM800L. Otherwise (L24) download new firmware from https://letmeknow.fr/blog/2018/01/09/tuto-update-firmware-sim8xx/. I know that is French blog but only there I find firmware for sim800l model L24. After uploading new firmware and calling AT+CGMR you will get 1418B05SIM800L24. So now firmware version is B05 and you can send(get) messages to the web-sites without problem.
Don't forget that this module is 2G and receiving characters from modern https web-site will take some time (a few tenths of a second).

Getting Token in Orion Context Broker

I'm trying to get an Authentication Token in order to start querying some information.
The problem is that when I execute the Token Script in Linux and I type my name and password, the server doesn't give me the token. I just get an empty space.
Does anybody know how to proceed?
EDIT: I just type
wget --no-check-certificate https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh
bash token_script.sh
In the Command Window in Ubuntu. The script asks me a user name and a password. When I write them, I just receive an empty space.
Thank you very much
[root#fi-next /]# wget --no-check-certificate https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh
--2017-08-01 09:59:27-- https://raw.githubusercontent.com/fgalan/oauth2-example-orion-client/master/token_script.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 288 [text/plain]
Saving to: ‘token_script.sh’
100%[====================================>] 288 --.-K/s in 0s
2017-08-01 09:59:27 (25.1 MB/s) - ‘token_script.sh’ saved [288/288]
[root#fi-next /]# bash token_script.sh
Username: fernando.mendez.external#atos.net
Password:
Token: xxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, it's worked for me.
You must have an account in fiware lab
Regards

What does the access log format signifies

What does the following format signifies?
"GET /shipments HTTP/1.1" 200 1339
GET is the type of request
/shipments is the url hit
200 is the status code
What are HTTP/1.1 and 1339
In your example, HTTP/1.1 is the HTTP version the client used to make its request, and 1339 the length of the response in bytes.
Check out the documentation for the mod_log_config for a list of all the variables that can be used in log files.

PSI WCF New-WebServiceProxy

Motivation:
As we can read in Project Server Architecture
The SOAP-based ASMX interface for web services in the PSI is still available in Project Server 2013, but is deprecated.
As-Is
I have some PowerShell client snippets that I use to interact with Project Server. The standard way to communicate with the server are PSI ASMX web services.
To-Be
I would like to refactor the snippets to the standard of using PSI WCF web services.
Result
For example the following simple code works fine:
$Passwd = Get-Content $home\Documents\Password.txt | ConvertTo-SecureString
$Credential = New-Object -typename System.Management.Automation.PsCredential -argumentlist "user_name",$Passwd
$PWAUrl = "http://project_server_name/PWA"
$ProjSvcURL = $PWAUrl + "/_vti_bin/PSI/Project.asmx?wsdl"
$ProjSvcProxy = New-WebServiceProxy -uri $ProjSvcURL -credential $Credential
$projDataSet = $ProjSvcProxy.ReadProjectList()
$projDataSet.Tables[0].Rows.Count
but the simple conversion:
$Passwd = Get-Content $home\Documents\Password.txt | ConvertTo-SecureString
$Credential = New-Object -typename System.Management.Automation.PsCredential -argumentlist "user_name",$Passwd
$PWAUrl = "http://project_server_name/PWA"
$ProjSvcURL = $PWAUrl + "/_vti_bin/PSI/ProjectServer.svc"
...
fails with the message:
New-WebServiceProxy : The request failed with HTTP status 400: Bad Request.
Here is IIS log excerpt:
2014-01-05 13:50:41 10.15.43.7 GET /PWA/_vti_bin/PSI/ProjectServer.svc - 80 - XXX.XXX.XXX.XXX Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.5472) 401 1 2148074254 125
2014-01-05 13:50:41 10.15.43.7 GET /PWA/_vti_bin/PSI/ProjectServer.svc - 80 - XXX.XXX.XXX.XXX Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.5472) 401 2 5 328
2014-01-05 13:50:41 10.15.43.7 GET /_vti_bin/PSI/ProjectServer.svc/ntlm - 80 user_name XXX.XXX.XXX.XXX Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.5472) 400 0 0 140
2014-01-05 17:58:33 10.15.43.7 GET /PWA/_vti_bin/PSI/ProjectServer.svc - 80 - XXX.XXX.XXX.XXX Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.5472) 401 2 5 312
2014-01-05 17:58:33 10.15.43.7 GET /PWA/_vti_bin/PSI/ProjectServer.svc - 80 - XXX.XXX.XXX.XXX Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.5472) 401 1 2148074254 156
2014-01-05 17:58:33 10.15.43.7 GET /_vti_bin/PSI/ProjectServer.svc/ntlm - 80 user_name XXX.XXX.XXX.XXX Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.5472) 400 0 0 109
It is interesting that I cannot find any examples of using WCF PSI with PowerShell.
Have anyone tried to do this?
Have anyone succeed?
Can anyone publish any snippet?
I just had the same Problem as you do. Project Server Scripts using the asmx and wanting to port them to the WCF Service pendants.
After some digging I found the following MSDN Site:
http://msdn.microsoft.com/en-us/library/office/ms488627(v=office.15).aspx#pj15_PSIRefOverview_PSI
On there you got this Picture, shedding some light onto the whole WCF SVC thing: They are there, just not where you would expect them to be...
https://app.box.com/s/tsi7150bgra3rpg4n6yu
I tried to call the Service - and it worked like a charm.
I hope this helps you too!
P.S. Apologies for the box link... don't have enough reputation yet to post images ;)