services-config.xml
ディスクリプタファイルは "Logging" XML 要素を指定して、ログの各要素を記述します。次のようになります。
<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Debug">
<properties>
<prefix>[BlazeDS]</prefix>
<includeDate>false</includeDate>
<includeTime>false</includeTime>
<includeLevel>false</includeLevel>
<includeCategory>false</includeCategory>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
<pattern>Service.*</pattern>
<pattern>Configuration</pattern>
</filters>
</target>
</logging>
target
タグでは、ログレベルを示す level
と呼ばれる属性をオプションで使用できます。デバッグ レベルが詳細すぎるレベルに設定されている場合、アプリケーションが機密データをログ ファイルに書き込む可能性があります。
String arg = request.getParameter("arg");
...
Intent intent = new Intent();
...
intent.setClassName(arg);
ctx.startActivity(intent);
...
Intent
が検出されています。暗黙的な内部インテントにより、システムが内部コンポーネントに対する中間者攻撃にさらされる可能性があります。Intent
は、内部コンポーネントによって定義されたカスタム アクションを使用します。暗黙的なインテントを使用すると、特定のコンポーネントを知らなくても、外部コンポーネントからのインテントの呼び出しが容易になります。この 2 つを組み合わせることで、アプリケーションは、目的のアプリケーション コンテキストの外部から、特定の内部使用のために指定されたインテントにアクセスできるようになります。Intent
を処理できることにより、情報漏洩や Denial of Service からリモート コード実行に至るまで、Intent
で指定された内部アクションのキャパシティに応じて、さまざまな深刻度の中間者攻撃が可能になります。Intent
を使用しています。
...
val imp_internal_intent_action = Intent("INTERNAL_ACTION_HERE")
startActivity(imp_internal_intent_action)
...
PendingIntent
が検出されています。暗黙的なペンディング インテントは、Denial of Service、個人情報やシステム情報の漏洩、権限昇格などのセキュリティ上の脆弱性を引き起こす可能性があります。Intent
を提供するために作成されます。暗黙的インテントは、一般的な名前やフィルタを使用して実行を決定することで、外部コンポーネントからのインテントの呼び出しを容易にします。Intent
が PendingIntent
として作成されると、Intent
が、想定される一時的なコンテキスト外で実行されている、意図しないコンポーネントに送信される可能性があります。その結果、システムが、Denial of Service、個人情報やシステム情報の漏洩、特権昇格などの攻撃にさらされることになります。PendingIntent
を使用しています。
...
val imp_intent = Intent()
val flag_mut = PendingIntent.FLAG_MUTABLE
val pi_flagmutable_impintintent = PendingIntent.getService(
this,
0,
imp_intent,
flag_mut
)
...
FLAG_MUTABLE
に設定された PendingIntent
が検出されています。フラグ値 FLAG_MUTABLE
を使用して作成されたペンディング インテントでは、未指定の Intent
フィールドにダウンストリームを設定されやすく、その結果、Intent
のキャパシティが変更され、システムが攻撃にさらされやすくなります。PendingIntent
の基盤となる Intent
の変更を、作成後に許可すると、システムが攻撃にさらされやすくなります。これは主に、基盤となる Intent
の全体的な機能に依存します。ほとんどの場合、PendingIntent
フラグを FLAG_IMMUTABLE
に設定することが、潜在的な問題を防ぐためのベスト プラクティスです。FLAG_MUTABLE
を使用して作成された PendingIntent
が含まれています。
...
val intent_flag_mut = Intent(Intent.ACTION_GTALK_SERVICE_DISCONNECTED, Uri.EMPTY, this, DownloadService::class.java)
val flag_mut = PendingIntent.FLAG_MUTABLE
val pi_flagmutable = PendingIntent.getService(
this,
0,
intent_flag_mut,
flag_mut
)
...
Intent
を使用してアクティビティを開始し、サービスを開始し、ブロードキャストを配信すると、攻撃者は内部アプリケーション コンポーネントを自由に起動し、内部コンポーネントの振る舞いを制御し、一時的な権限許可を通してコンテンツ プロバイダーから保護データに間接的にアクセスできるようになる可能性があります。Intent
の Extras Bundle にネスト化された任意の Intent
を受け入れます。startActivity
、startService
、または sendBroadcast
を呼び出すことで、任意の Intent
を使用してコンポーネントを起動します。Intent
を受け入れ、その Intent
を使用してアクティビティを開始しています。
...
Intent nextIntent = (Intent) getIntent().getParcelableExtra("next-intent");
startActivity(nextIntent);
...
...
encryptionKey = "".
...
...
var encryptionKey:String = "";
var key:ByteArray = Hex.toArray(Hex.fromString(encryptionKey));
...
var aes.ICipher = Crypto.getCipher("aes-cbc", key, padding);
...
...
char encryptionKey[] = "";
...
...
<cfset encryptionKey = "" />
<cfset encryptedMsg = encrypt(msg, encryptionKey, 'AES', 'Hex') />
...
...
key := []byte("");
block, err := aes.NewCipher(key)
...
...
private static String encryptionKey = "";
byte[] keyBytes = encryptionKey.getBytes();
SecretKeySpec key = new SecretKeySpec(keyBytes, "AES");
Cipher encryptCipher = Cipher.getInstance("AES");
encryptCipher.init(Cipher.ENCRYPT_MODE, key);
...
...
var crypto = require('crypto');
var encryptionKey = "";
var algorithm = 'aes-256-ctr';
var cipher = crypto.createCipher(algorithm, encryptionKey);
...
...
CCCrypt(kCCEncrypt,
kCCAlgorithmAES,
kCCOptionPKCS7Padding,
"",
0,
iv,
plaintext,
sizeof(plaintext),
ciphertext,
sizeof(ciphertext),
&numBytesEncrypted);
...
...
$encryption_key = '';
$filter = new Zend_Filter_Encrypt($encryption_key);
$filter->setVector('myIV');
$encrypted = $filter->filter('text_to_be_encrypted');
print $encrypted;
...
...
from Crypto.Ciphers import AES
cipher = AES.new("", AES.MODE_CFB, iv)
msg = iv + cipher.encrypt(b'Attack at dawn')
...
require 'openssl'
...
dk = OpenSSL::PKCS5::pbkdf2_hmac_sha1(password, salt, 100000, 0) # returns an empty string
...
...
CCCrypt(UInt32(kCCEncrypt),
UInt32(kCCAlgorithmAES128),
UInt32(kCCOptionPKCS7Padding),
"",
0,
iv,
plaintext,
plaintext.length,
ciphertext.mutableBytes,
ciphertext.length,
&numBytesEncrypted)
...
...
Dim encryptionKey As String
Set encryptionKey = ""
Dim AES As New System.Security.Cryptography.RijndaelManaged
On Error GoTo ErrorHandler
AES.Key = System.Text.Encoding.ASCII.GetBytes(encryptionKey)
...
Exit Sub
...
...
DATA: lo_hmac TYPE Ref To cl_abap_hmac,
Input_string type string.
CALL METHOD cl_abap_hmac=>get_instance
EXPORTING
if_algorithm = 'SHA3'
if_key = space
RECEIVING
ro_object = lo_hmac.
" update HMAC with input
lo_hmac->update( if_data = input_string ).
" finalise hmac
lo_digest->final( ).
...
Example 1
に示すコードは正常に実行されますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くことができます。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。また Example 1
のコードは、フォージェリ攻撃や鍵回復攻撃に対して脆弱です。
...
using (HMAC hmac = HMAC.Create("HMACSHA512"))
{
string hmacKey = "";
byte[] keyBytes = Encoding.ASCII.GetBytes(hmacKey);
hmac.Key = keyBytes;
...
}
...
Example 1
のコードは正常に実行されますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くことができます。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。また Example 1
のコードは、フォージェリ攻撃や鍵回復攻撃に対して脆弱です。
import "crypto/hmac"
...
hmac.New(md5.New, []byte(""))
...
Example 1
のコードは正常に実行されますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くことができます。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。また Example 1
のコードは、フォージェリ攻撃や鍵回復攻撃に対して脆弱です。
...
private static String hmacKey = "";
byte[] keyBytes = hmacKey.getBytes();
...
SecretKeySpec key = new SecretKeySpec(keyBytes, "SHA1");
Mac hmac = Mac.getInstance("HmacSHA1");
hmac.init(key);
...
Example 1
のコードは正常に実行されますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くことができます。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。また Example 1
のコードは、フォージェリ攻撃や鍵回復攻撃に対して脆弱です。
...
let hmacKey = "";
let hmac = crypto.createHmac("SHA256", hmacKey);
hmac.update(data);
...
例 1
のコードは正常に実行される可能性がありますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くかもしれません。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。
...
CCHmac(kCCHmacAlgSHA256, "", 0, plaintext, plaintextLen, &output);
...
Example 1
のコードは正常に実行されますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くことができます。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。また Example 1
のコードは、フォージェリ攻撃や鍵回復攻撃に対して脆弱です。
import hmac
...
mac = hmac.new("", plaintext).hexdigest()
...
Example 1
のコードは正常に実行されますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くことができます。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。また Example 1
のコードは、フォージェリ攻撃や鍵回復攻撃に対して脆弱です。
...
digest = OpenSSL::HMAC.digest('sha256', '', data)
...
Example 1
のコードは正常に実行されますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くことができます。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。また Example 1
のコードは、フォージェリ攻撃や鍵回復攻撃に対して脆弱です。
...
CCHmac(UInt32(kCCHmacAlgSHA256), "", 0, plaintext, plaintextLen, &output)
...
Example 1
のコードは正常に実行されますが、そのコードにアクセスしたユーザーは空の HMAC 鍵が使われていることに気付くことができます。プログラムが頒布された後は、プログラムにパッチを適用しない限り、空の HMAC キーを変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。また Example 1
のコードは、フォージェリ攻撃や鍵回復攻撃に対して脆弱です。
...
Rfc2898DeriveBytes rdb = new Rfc2898DeriveBytes("", salt,100000);
...
...
var encryptor = new StrongPasswordEncryptor();
var encryptedPassword = encryptor.encryptPassword("");
...
const pbkdfPassword = "";
crypto.pbkdf2(
pbkdfPassword,
salt,
numIterations,
keyLen,
hashAlg,
function (err, derivedKey) { ... }
)
...
CCKeyDerivationPBKDF(kCCPBKDF2,
"",
0,
salt,
saltLen
kCCPRFHmacAlgSHA256,
100000,
derivedKey,
derivedKeyLen);
...
...
CCKeyDerivationPBKDF(kCCPBKDF2,
password,
0,
salt,
saltLen
kCCPRFHmacAlgSHA256,
100000,
derivedKey,
derivedKeyLen);
...
password
に強力で適切に管理されたパスワードの値が含まれる場合でも、パスワードの長さをゼロで渡すと、空パスワード、null
パスワード、または予期せぬ脆弱なパスワード値になります。
...
$zip = new ZipArchive();
$zip->open("test.zip", ZipArchive::CREATE);
$zip->setEncryptionIndex(0, ZipArchive::EM_AES_256, "");
...
from hashlib import pbkdf2_hmac
...
dk = pbkdf2_hmac('sha256', '', salt, 100000)
...
...
key = OpenSSL::PKCS5::pbkdf2_hmac('', salt, 100000, 256, 'SHA256')
...
...
CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2),
"",
0,
salt,
saltLen,
CCPseudoRandomAlgorithm(kCCPRFHmacAlgSHA256),
100000,
derivedKey,
derivedKeyLen)
...
...
CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2),
password,
0,
salt,
saltLen,
CCPseudoRandomAlgorithm(kCCPRFHmacAlgSHA256),
100000,
derivedKey,
derivedKeyLen)
...
password
に強力で適切に管理されたパスワードの値が含まれる場合でも、パスワードの長さをゼロで渡すと、空パスワード、null
パスワード、または予期せぬ脆弱なパスワード値になります。
...
encryptionKey = "lakdsljkalkjlksdfkl".
...
...
var encryptionKey:String = "lakdsljkalkjlksdfkl";
var key:ByteArray = Hex.toArray(Hex.fromString(encryptionKey));
...
var aes.ICipher = Crypto.getCipher("aes-cbc", key, padding);
...
...
Blob encKey = Blob.valueOf('YELLOW_SUBMARINE');
Blob encrypted = Crypto.encrypt('AES128', encKey, iv, input);
...
...
using (SymmetricAlgorithm algorithm = SymmetricAlgorithm.Create("AES"))
{
string encryptionKey = "lakdsljkalkjlksdfkl";
byte[] keyBytes = Encoding.ASCII.GetBytes(encryptionKey);
algorithm.Key = keyBytes;
...
}
...
char encryptionKey[] = "lakdsljkalkjlksdfkl";
...
...
<cfset encryptionKey = "lakdsljkalkjlksdfkl" />
<cfset encryptedMsg = encrypt(msg, encryptionKey, 'AES', 'Hex') />
...
...
key := []byte("lakdsljkalkjlksd");
block, err := aes.NewCipher(key)
...
...
private static final String encryptionKey = "lakdsljkalkjlksdfkl";
byte[] keyBytes = encryptionKey.getBytes();
SecretKeySpec key = new SecretKeySpec(keyBytes, "AES");
Cipher encryptCipher = Cipher.getInstance("AES");
encryptCipher.init(Cipher.ENCRYPT_MODE, key);
...
...
var crypto = require('crypto');
var encryptionKey = "lakdsljkalkjlksdfkl";
var algorithm = 'aes-256-ctr';
var cipher = crypto.createCipher(algorithm, encryptionKey);
...
...
{
"username":"scott"
"password":"tiger"
}
...
...
NSString encryptionKey = "lakdsljkalkjlksdfkl";
...
...
$encryption_key = 'hardcoded_encryption_key';
//$filter = new Zend_Filter_Encrypt('hardcoded_encryption_key');
$filter = new Zend_Filter_Encrypt($encryption_key);
$filter->setVector('myIV');
$encrypted = $filter->filter('text_to_be_encrypted');
print $encrypted;
...
...
from Crypto.Ciphers import AES
encryption_key = b'_hardcoded__key_'
cipher = AES.new(encryption_key, AES.MODE_CFB, iv)
msg = iv + cipher.encrypt(b'Attack at dawn')
...
_hardcoded__key_
を変更することはできません。不心得な従業員がこの情報へのアクセス権を持っている場合、この暗号化鍵を使用してシステムによって暗号化されているデータを危険な状態におくことがあります。
require 'openssl'
...
encryption_key = 'hardcoded_encryption_key'
...
cipher = OpenSSL::Cipher::AES.new(256, 'GCM')
cipher.encrypt
...
cipher.key=encryption_key
...
例 2: 次のコードは、ハードコーディングされている暗号鍵を使用して AES 暗号化を行っています。
...
let encryptionKey = "YELLOW_SUBMARINE"
...
...
CCCrypt(UInt32(kCCEncrypt),
UInt32(kCCAlgorithmAES128),
UInt32(kCCOptionPKCS7Padding),
"YELLOW_SUBMARINE",
16,
iv,
plaintext,
plaintext.length,
ciphertext.mutableBytes,
ciphertext.length,
&numBytesEncrypted)
...
...
-----BEGIN RSA PRIVATE KEY-----
MIICXwIBAAKBgQCtVacMo+w+TFOm0p8MlBWvwXtVRpF28V+o0RNPx5x/1TJTlKEl
...
DiJPJY2LNBQ7jS685mb6650JdvH8uQl6oeJ/aUmq63o2zOw=
-----END RSA PRIVATE KEY-----
...
...
Dim encryptionKey As String
Set encryptionKey = "lakdsljkalkjlksdfkl"
Dim AES As New System.Security.Cryptography.RijndaelManaged
On Error GoTo ErrorHandler
AES.Key = System.Text.Encoding.ASCII.GetBytes(encryptionKey)
...
Exit Sub
...
...
production:
secret_key_base: 0ab25e26286c4fb9f7335947994d83f19861354f19702b7bbb84e85310b287ba3cdc348f1f19c8cdc08a7c6c5ad2c20ad31ecda177d2c74aa2d48ec4a346c40e
...
...
DATA: lo_hmac TYPE Ref To cl_abap_hmac,
Input_string type string.
CALL METHOD cl_abap_hmac=>get_instance
EXPORTING
if_algorithm = 'SHA3'
if_key = 'secret_key'
RECEIVING
ro_object = lo_hmac.
" update HMAC with input
lo_hmac->update( if_data = input_string ).
" finalise hmac
lo_digest->final( ).
...
...
using (HMAC hmac = HMAC.Create("HMACSHA512"))
{
string hmacKey = "lakdsljkalkjlksdfkl";
byte[] keyBytes = Encoding.ASCII.GetBytes(hmacKey);
hmac.Key = keyBytes;
...
}
import "crypto/hmac"
...
hmac.New(sha256.New, []byte("secret"))
...
...
private static String hmacKey = "lakdsljkalkjlksdfkl";
byte[] keyBytes = hmacKey.getBytes();
...
SecretKeySpec key = new SecretKeySpec(keyBytes, "SHA1");
Mac hmac = Mac.getInstance("HmacSHA1");
hmac.init(key);
...
const hmacKey = "a secret";
const hmac = createHmac('sha256', hmacKey);
hmac.update(data);
...
hmacKey
を変更できないと考えられます。不心得な従業員がこの情報へのアクセス権を持っている場合、HMAC 関数の安全性が損なわれる可能性があります。
...
CCHmac(kCCHmacAlgSHA256, "secret", 6, plaintext, plaintextLen, &output);
...
import hmac
...
mac = hmac.new("secret", plaintext).hexdigest()
...
...
digest = OpenSSL::HMAC.digest('sha256', 'secret_key', data)
...
...
CCHmac(UInt32(kCCHmacAlgSHA256), "secret", 6, plaintext, plaintextLen, &output)
...
...
Rfc2898DeriveBytes rdb = new Rfc2898DeriveBytes("password", salt,100000);
...
...
var encryptor = new StrongPasswordEncryptor();
var encryptedPassword = encryptor.encryptPassword("password");
...
const pbkdfPassword = "a secret";
crypto.pbkdf2(
pbkdfPassword,
salt,
numIterations,
keyLen,
hashAlg,
function (err, derivedKey) { ... }
)
...
CCKeyDerivationPBKDF(kCCPBKDF2,
"secret",
6,
salt,
saltLen
kCCPRFHmacAlgSHA256,
100000,
derivedKey,
derivedKeyLen);
...
...
$zip = new ZipArchive();
$zip->open("test.zip", ZipArchive::CREATE);
$zip->setEncryptionIndex(0, ZipArchive::EM_AES_256, "hardcodedpassword");
...
from hashlib import pbkdf2_hmac
...
dk = pbkdf2_hmac('sha256', 'password', salt, 100000)
...
...
key = OpenSSL::PKCS5::pbkdf2_hmac('password', salt, 100000, 256, 'SHA256')
...
...
CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2),
"secret",
6,
salt,
saltLen,
CCPseudoRandomAlgorithm(kCCPRFHmacAlgSHA256),
100000,
derivedKey,
derivedKeyLen)
...
Null
の暗号鍵はセキュリティを危険にさらす可能性があり、この問題への対策は簡単ではありません。null
暗号鍵を使用することは推奨されません。これにより優れた暗号アルゴリズムによる保護機能が大幅に低下し、問題の修正が極めて困難になるためです。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用して AES 暗号を実行します。
...
var encryptionKey:ByteArray = null;
...
var aes.ICipher = Crypto.getCipher("aes-cbc", encryptionKey, padding);
...
null
暗号鍵を使用していることが誰にでも判別できる上に、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。アプリケーションが頒布された後は、null
暗号鍵を変更するためのソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。Null
の暗号鍵はセキュリティを危険にさらす可能性があり、この問題への対策は簡単ではありません。null
暗号鍵を使用することは推奨されません。null
暗号鍵を使用すると、優れた暗号アルゴリズムによる保護機能が大幅に低下するとともに、問題の修正が極めて困難になります。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用しています。
...
char encryptionKey[] = null;
...
null
暗号鍵を使用していることが誰にでも判別できる上に、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。プログラムが頒布された後で、null
暗号化鍵を変更するためには、ソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
暗号鍵を使用することは推奨されません。これにより優れた暗号アルゴリズムによる保護機能が大幅に低下し、問題の修正が極めて困難になるためです。有害なコードが実運用に入ったら、null
暗号鍵の変更にはソフトウェア パッチを必要とします。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択することになります。null
暗号鍵を使用して AES 暗号を実行します。
...
aes.NewCipher(nil)
...
null
暗号鍵を使用していることが誰にでも判別できます。その上、初歩的なクラッキング技法さえ身につけていれば誰でも、暗号化されたあらゆるデータを完全に解読できる可能性が高まります。アプリケーションが頒布された後は、null
暗号鍵を変更するためのソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
暗号鍵を使用することは推奨されません。これにより優れた暗号アルゴリズムによる保護機能が大幅に低下し、問題の修正が極めて困難になるためです。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用して AES 暗号を実行します。
...
SecretKeySpec key = null;
....
Cipher encryptCipher = Cipher.getInstance("AES");
encryptCipher.init(Cipher.ENCRYPT_MODE, key);
...
null
暗号鍵を使用していることが誰にでも判別できる上に、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。アプリケーションが頒布された後は、null
暗号鍵を変更するためのソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
暗号鍵を使用することは推奨されません。これにより優れた暗号アルゴリズムによる保護機能が大幅に低下し、問題の修正が極めて困難になるためです。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用して AES 暗号を実行します。
...
var crypto = require('crypto');
var encryptionKey = null;
var algorithm = 'aes-256-ctr';
var cipher = crypto.createCipher(algorithm, encryptionKey);
...
null
暗号鍵を使用していることが誰にでも判別できる上に、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。アプリケーションが頒布された後は、null
暗号鍵を変更するためのソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
暗号鍵を使用することは推奨されません。これにより優れた暗号アルゴリズムによる保護機能が大幅に低下し、問題の修正が極めて困難になるためです。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用して AES 暗号を実行します。
...
CCCrypt(kCCEncrypt,
kCCAlgorithmAES,
kCCOptionPKCS7Padding,
nil,
0,
iv,
plaintext,
sizeof(plaintext),
ciphertext,
sizeof(ciphertext),
&numBytesEncrypted);
...
null
暗号鍵を使用していることが誰にでも判別できる上に、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。アプリケーションが頒布された後は、null
暗号鍵を変更するためのソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
を割り当てるのは、攻撃者がセンシティブな暗号化された情報にアクセスできるようになるため、適切ではありません。null
暗号鍵を使用すると、優れた暗号アルゴリズムによる保護機能が大幅に低下するとともに、問題の修正が極めて困難になります。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
に設定します。
...
$encryption_key = NULL;
$filter = new Zend_Filter_Encrypt($encryption_key);
$filter->setVector('myIV');
$encrypted = $filter->filter('text_to_be_encrypted');
print $encrypted;
...
null
暗号鍵を使用していることが誰にでも判別でき、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。プログラムが頒布された後で、null
暗号化鍵を変更するためには、ソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
暗号鍵を使用することは推奨されません。これにより優れた暗号アルゴリズムによる保護機能が大幅に低下し、問題の修正が極めて困難になるためです。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用していることが誰にでも判別できる上に、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。アプリケーションが頒布された後は、null
暗号鍵を変更するためのソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。None
を割り当てるのは、攻撃者がセンシティブな暗号化された情報にアクセスできるようになるため、適切ではありません。null
暗号鍵を使用すると、優れた暗号アルゴリズムによる保護機能が大幅に低下するとともに、問題の修正が極めて困難になります。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
に設定します。
...
from Crypto.Ciphers import AES
cipher = AES.new(None, AES.MODE_CFB, iv)
msg = iv + cipher.encrypt(b'Attack at dawn')
...
null
暗号鍵を使用していることが誰にでも判別でき、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。プログラムが頒布された後で、null
暗号化鍵を変更するためには、ソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
暗号鍵を使用することは推奨されません。null
暗号鍵を使用すると、優れた暗号アルゴリズムによる保護機能が大幅に低下するとともに、問題の修正が極めて困難になります。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用していることが誰にでも判別でき、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。プログラムが頒布された後で、null
暗号化鍵を変更するためには、ソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。Null
の暗号鍵はセキュリティを危険にさらす可能性があり、この問題への対策は簡単ではありません。null
暗号鍵を使用することは推奨されません。null
暗号鍵を使用すると、優れた暗号アルゴリズムによる保護機能が大幅に低下するとともに、問題の修正が極めて困難になります。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用して AES 暗号を実行します。
...
CCCrypt(UInt32(kCCEncrypt),
UInt32(kCCAlgorithmAES128),
UInt32(kCCOptionPKCS7Padding),
nil,
0,
iv,
plaintext,
plaintext.length,
ciphertext.mutableBytes,
ciphertext.length,
&numBytesEncrypted)
...
null
暗号鍵を使用していることが誰にでも判別できる上に、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。プログラムが頒布された後で、null
暗号化鍵を変更するためには、ソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
暗号鍵を使用することは推奨されません。これにより優れた暗号アルゴリズムによる保護機能が大幅に低下し、問題の修正が極めて困難になるためです。有害なコードが実運用に入ったら、null
暗号鍵を変更するためのソフトウェア パッチが必要です。null
暗号鍵によって保護されたアカウントが危険にさらされると、システムの所有者はセキュリティと可用性のいずれかを選択しなければなりません。null
暗号鍵を使用して AES 暗号を実行します。
...
Dim encryptionKey As String
Set encryptionKey = vbNullString
Dim AES As New System.Security.Cryptography.RijndaelManaged
On Error GoTo ErrorHandler
AES.Key = System.Text.Encoding.ASCII.GetBytes(encryptionKey)
...
Exit Sub
...
null
暗号鍵を使用していることが誰にでも判別できる上に、初歩的なクラッキング技法を使えれば暗号化されたあらゆるデータを完全に解読できる可能性が高まります。アプリケーションが頒布された後は、null
暗号鍵を変更するためのソフトウェア パッチが必要です。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
暗号鍵が使われている証拠を割り出すことが可能です。null
パスワードに基づいて暗号鍵を生成し使用すると、システムのセキュリティを危険にさらす可能性があり、この問題への対策は簡単ではありません。null
値をパスワード引数としてパスワードベースの暗号鍵導出関数に渡すのはよくない発想です。このシナリオでは、導出鍵は指定の salt のみに基づくことになり (鍵は著しく脆弱になる)、その問題を修正することは非常に困難です。有害なコードが実運用に入ると、多くの場合、ソフトウェアにパッチを当てない限り null
パスワードは変更できません。null
パスワードに基づいて導出した鍵で保護されるアカウントが危険にさらされると、システムの所有者はセキュリティと可用性の二者択一を強いられます。null
値をパスワード引数としてパスワードベースの暗号鍵導出関数に渡します。
...
var encryptor = new StrongPasswordEncryptor();
var encryptedPassword = encryptor.encryptPassword(null);
...
null
パスワード引数に基づいてコードから暗号鍵が 1 つ以上生成されることを判別できる上に、初歩的なクラック技法を使用できれば、不正な鍵で保護されているどのリソースにもアクセスできる可能性が高まります。攻撃者が、null
パスワードに基づく鍵の生成に使用される salt 値にもアクセスできれば、それらの鍵のクラッキングは容易になります。プログラムが頒布された後は、プログラムにパッチを適用しない限り、null
パスワードを変更できないと考えられます。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
パスワードが使われている証拠を割り出すことが可能です。null
パスワードに基づいて暗号鍵を生成し使用すると、システムのセキュリティを危険にさらす可能性があり、この問題への対策は簡単ではありません。null
値をパスワード引数としてパスワードベースの暗号鍵導出関数に渡すのはよくない発想です。このシナリオでは、導出鍵は指定の salt のみに基づくことになり (鍵は著しく脆弱になる)、その問題を修正することは非常に困難です。有害なコードが実運用に入ると、多くの場合、ソフトウェアにパッチを当てない限り null
パスワードは変更できません。null
パスワードに基づいて導出した鍵で保護されるアカウントが危険にさらされると、システムの所有者はセキュリティと可用性の二者択一を強いられます。null
値をパスワード引数としてパスワードベースの暗号鍵導出関数に渡します。
...
CCKeyDerivationPBKDF(kCCPBKDF2,
nil,
0,
salt,
saltLen
kCCPRFHmacAlgSHA256,
100000,
derivedKey,
derivedKeyLen);
...
null
パスワード引数に基づいてコードから暗号鍵が 1 つ以上生成されることを判別できる上に、初歩的なクラック技法を使用できれば、不正な鍵で保護されているどのリソースにもアクセスできる可能性が高まります。攻撃者が、null
パスワードに基づく鍵の生成に使用される salt 値にもアクセスできれば、それらの鍵のクラッキングは容易になります。プログラムが頒布された後は、プログラムにパッチを適用しない限り、null
パスワードを変更できないと考えられます。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
パスワードが使われている証拠を割り出すことが可能です。null
パスワードに基づいて暗号鍵を生成し使用すると、システムのセキュリティを危険にさらす可能性があり、この問題への対策は簡単ではありません。null
値をパスワード引数としてパスワードベースの暗号鍵導出関数に渡すのはよくない発想です。このシナリオでは、導出鍵は指定の salt のみに基づくことになり (鍵は著しく脆弱になる)、その問題を修正することは非常に困難です。有害なコードが実運用に入ると、多くの場合、ソフトウェアにパッチを当てない限り null
パスワードは変更できません。null
パスワードに基づいて導出した鍵で保護されるアカウントが危険にさらされると、システムの所有者はセキュリティと可用性の二者択一を強いられます。null
値をパスワード引数としてパスワードベースの暗号鍵導出関数に渡します。
...
CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2),
nil,
0,
salt,
saltLen,
CCPseudoRandomAlgorithm(kCCPRFHmacAlgSHA256),
100000,
derivedKey,
derivedKeyLen)
...
null
パスワード引数に基づいてコードから暗号鍵が 1 つ以上生成されることを判別できる上に、初歩的なクラック技法を使用できれば、不正な鍵で保護されているどのリソースにもアクセスできる可能性が高まります。攻撃者が、null
パスワードに基づく鍵の生成に使用される salt 値にもアクセスできれば、それらの鍵のクラッキングは容易になります。プログラムが頒布された後は、プログラムにパッチを適用しない限り、null
パスワードを変更できないと考えられます。この情報へのアクセス権を持っている従業員が、権限を使用してシステムに侵入する可能性があります。攻撃者はアプリケーションの実行可能ファイルにさえアクセスできれば、null
パスワードが使われている証拠を割り出すことが可能です。
from Crypto.PublicKey import RSA
key = RSA.generate(2048)
f = open('mykey.pem','w')
f.write(key.exportKey(format='PEM'))
f.close()
require 'openssl'
key = OpenSSL::PKey::RSA.new 2048
File.open('mykey.pem', 'w') do |file|
file.write(key.to_pem)
end
search
メソッドに渡された javax.naming.directory.SearchControls
インスタンスで returningObjectFlag
を true
に設定するか、代わりにこのフラグを設定するライブラリ関数を使用することで、オブジェクトを返す検索を実行します。
<beans ... >
<authentication-manager>
<ldap-authentication-provider
user-search-filter="(uid={0})"
user-search-base="ou=users,dc=example,dc=org"
group-search-filter="(uniqueMember={0})"
group-search-base="ou=groups,dc=example,dc=org"
group-role-attribute="cn"
role-prefix="ROLE_">
</ldap-authentication-provider>
</authentication-manager>
</beans>
...
DATA log_msg TYPE bal_s_msg.
val = request->get_form_field( 'val' ).
log_msg-msgid = 'XY'.
log_msg-msgty = 'E'.
log_msg-msgno = '123'.
log_msg-msgv1 = 'VAL: '.
log_msg-msgv2 = val.
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
I_S_MSG = log_msg
EXCEPTIONS
LOG_NOT_FOUND = 1
MSG_INCONSISTENT = 2
LOG_IS_FULL = 3
OTHERS = 4.
...
val
として「FOO
」という文字列を送信すると、以下のエントリが記録されます。
XY E 123 VAL: FOO
FOO XY E 124 VAL: BAR
」という文字列を送信すると、以下のエントリが記録されます。
XY E 123 VAL: FOO XY E 124 VAL: BAR
var params:Object = LoaderInfo(this.root.loaderInfo).parameters;
var val:String = String(params["username"]);
var value:Number = parseInt(val);
if (value == Number.NaN) {
trace("Failed to parse val = " + val);
}
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
Failed to parse val=twenty-one
twenty-one%0a%0aINFO:+User+logged+out%3dbadguy
」という文字列を送信すると、以下のエントリが記録されます。
Failed to parse val=twenty-one
User logged out=badguy
...
string val = (string)Session["val"];
try {
int value = Int32.Parse(val);
}
catch (FormatException fe) {
log.Info("Failed to parse val= " + val);
}
...
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Failed to parse val=twenty-one
twenty-one%0a%0aINFO:+User+logged+out%3dbadguy
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Failed to parse val=twenty-one
INFO: User logged out=badguy
long value = strtol(val, &endPtr, 10);
if (*endPtr != '\0')
syslog(LOG_INFO,"Illegal value = %s",val);
...
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
Illegal value=twenty-one
twenty-one\n\nINFO: User logged out=evil
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Illegal value=twenty-one
INFO: User logged out=evil
...
01 LOGAREA.
05 VALHEADER PIC X(50) VALUE 'VAL: '.
05 VAL PIC X(50).
...
EXEC CICS
WEB READ
FORMFIELD(NAME)
VALUE(VAL)
...
END-EXEC.
EXEC DLI
LOG
FROM(LOGAREA)
LENGTH(50)
END-EXEC.
...
VAL
として「FOO
」という文字列を送信すると、以下のエントリが記録されます。
VAL: FOO
FOO VAL: BAR
」という文字列を送信すると、以下のエントリが記録されます。
VAL: FOO VAL: BAR
<cflog file="app_log" application="No" Thread="No"
text="Failed to parse val="#Form.val#">
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
"Information",,"02/28/01","14:50:37",,"Failed to parse val=twenty-one"
twenty-one%0a%0a%22Information%22%2C%2C%2202/28/01%22%2C%2214:53:40%22%2C%2C%22User%20logged%20out:%20badguy%22
」という文字列を送信すると、以下のエントリが記録されます。
"Information",,"02/28/01","14:50:37",,"Failed to parse val=twenty-one"
"Information",,"02/28/01","14:53:40",,"User logged out: badguy"
func someHandler(w http.ResponseWriter, r *http.Request){
r.parseForm()
name := r.FormValue("name")
logout := r.FormValue("logout")
...
if (logout){
...
} else {
log.Printf("Attempt to log out: name: %s logout: %s", name, logout)
}
}
logout
として「twenty-one
」という文字列を送信すると、「admin
」という名前のユーザーを作成でき、以下のエントリが記録されます。
Attempt to log out: name: admin logout: twenty-one
admin+logout:+1+++++++++++++++++++++++
」というユーザー名を作成できる場合、以下のエントリが記録されます。
Attempt to log out: name: admin logout: 1 logout: twenty-one
...
String val = request.getParameter("val");
try {
int value = Integer.parseInt(val);
}
catch (NumberFormatException nfe) {
log.info("Failed to parse val = " + val);
}
...
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Failed to parse val=twenty-one
twenty-one%0a%0aINFO:+User+logged+out%3dbadguy
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Failed to parse val=twenty-one
INFO: User logged out=badguy
Example 1
を応用しています。
...
String val = this.getIntent().getExtras().getString("val");
try {
int value = Integer.parseInt();
}
catch (NumberFormatException nfe) {
Log.e(TAG, "Failed to parse val = " + val);
}
...
var cp = require('child_process');
var http = require('http');
var url = require('url');
function listener(request, response){
var val = url.parse(request.url, true)['query']['val'];
if (isNaN(val)){
console.log("INFO: Failed to parse val = " + val);
}
...
}
...
http.createServer(listener).listen(8080);
...
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Failed to parse val = twenty-one
twenty-one%0a%0aINFO:+User+logged+out%3dbadguy
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Failed to parse val=twenty-one
INFO: User logged out=badguy
long value = strtol(val, &endPtr, 10);
if (*endPtr != '\0')
NSLog("Illegal value = %s",val);
...
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Illegal value=twenty-one
twenty-one\n\nINFO: User logged out=evil
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Illegal value=twenty-one
INFO: User logged out=evil
<?php
$name =$_GET['name'];
...
$logout =$_GET['logout'];
if(is_numeric($logout))
{
...
}
else
{
trigger_error("Attempt to log out: name: $name logout: $val");
}
?>
logout
として「twenty-one
」という文字列を送信すると、「admin
」という名前のユーザーを作成でき、以下のエントリが記録されます。
PHP Notice: Attempt to log out: name: admin logout: twenty-one
admin+logout:+1+++++++++++++++++++++++
」というユーザー名を作成できる場合、以下のエントリが記録されます。
PHP Notice: Attempt to log out: name: admin logout: 1 logout: twenty-one
name = req.field('name')
...
logout = req.field('logout')
if (logout):
...
else:
logger.error("Attempt to log out: name: %s logout: %s" % (name,logout))
logout
として「twenty-one
」という文字列を送信すると、「admin
」という名前のユーザーを作成でき、以下のエントリが記録されます。
Attempt to log out: name: admin logout: twenty-one
admin+logout:+1+++++++++++++++++++++++
」というユーザー名を作成できる場合、以下のエントリが記録されます。
Attempt to log out: name: admin logout: 1 logout: twenty-one
...
val = req['val']
unless val.respond_to?(:to_int)
logger.info("Failed to parse val")
logger.info(val)
end
...
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Failed to parse val
INFO: twenty-one
twenty-one%0a%0aINFO:+User+logged+out%3dbadguy
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Failed to parse val
INFO: twenty-one
INFO: User logged out=badguy
...
let num = Int(param)
if num == nil {
NSLog("Illegal value = %@", param)
}
...
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Illegal value = twenty-one
twenty-one\n\nINFO: User logged out=evil
」という文字列を送信すると、以下のエントリが記録されます。
INFO: Illegal value=twenty-one
INFO: User logged out=evil
...
Dim Val As Variant
Dim Value As Integer
Set Val = Request.Form("val")
If IsNumeric(Val) Then
Set Value = Val
Else
App.EventLog "Failed to parse val=" & Val, 1
End If
...
val
として「twenty-one
」という文字列を送信すると、以下のエントリが記録されます。
Failed to parse val=twenty-one
twenty-one%0a%0a+User+logged+out%3dbadguy
」という文字列を送信すると、以下のエントリが記録されます。
Failed to parse val=twenty-one
User logged out=badguy
CREATE
コマンドを作成します。攻撃者はこのパラメーターを使用して、サーバーに送信されるコマンドを変更し、CRLF 文字を使用して新しいコマンドを挿入します。
...
final String foldername = request.getParameter("folder");
IMAPFolder folder = (IMAPFolder) store.getFolder("INBOX");
...
folder.doCommand(new IMAPFolder.ProtocolCommand() {
@Override
public Object doCommand(IMAPProtocol imapProtocol) throws ProtocolException {
try {
imapProtocol.simpleCommand("CREATE " + foldername, null);
} catch (Exception e) {
// Handle Exception
}
return null;
}
});
...
USER
および PASS
コマンドを作成します。攻撃者はこのパラメーターを使用して、サーバーに送信されるコマンドを変更し、CRLF 文字を使用して新しいコマンドを挿入します。
...
String username = request.getParameter("username");
String password = request.getParameter("password");
...
POP3SClient pop3 = new POP3SClient(proto, false);
pop3.login(username, password)
...