Keys
Body Count のファイルについて、
テーブル loans
の foreign key の名前 (どれか1個) を要求された。
ファイルを観察すると、以下の部分があった。
Regarding the file used in Body Count,
a name of "foreign key" in the table loans
(either one of them) was asked.
Observing the file, I found this part:
テーブル loans
の情報と思われる部分
The part that looks like information about the table loans
CREATE TABLE `loans` (
`loan_id` smallint NOT NULL AUTO_INCREMENT,
`cust_id` smallint NOT NULL,
`employee_id` smallint NOT NULL,
`amt` decimal(10,2) NOT NULL,
`balance` decimal(10,2) NOT NULL,
`interest` decimal(10,2) DEFAULT NULL,
`loan_type_id` smallint NOT NULL,
PRIMARY KEY (`loan_id`),
KEY `fk_loans_cust_id` (`cust_id`),
KEY `fk_loans_employee_id` (`employee_id`),
KEY `fk_loans_loan_type_id` (`loan_type_id`),
CONSTRAINT `fk_loans_cust_id` FOREIGN KEY (`cust_id`) REFERENCES `customers` (`cust_id`) ON DELETE CASCADE,
CONSTRAINT `fk_loans_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`employee_id`) ON DELETE CASCADE,
CONSTRAINT `fk_loans_loan_type_id` FOREIGN KEY (`loan_type_id`) REFERENCES `loan_types` (`loan_type_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1785 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
この部分の FOREIGN KEY
の前にある最初の名前を用い、flagが得られた。
I obtained the flag using the first name before FOREIGN KEY
in this part.
flag{fk_loans_cust_id}
DEADFACE CTF