



RSA 會議 2023:人工智能慧如何滲透全球

RSA 會議是全球資訊安全領域的一個重要活動,每年都吸引了眾多安全專家和業界人士參加。今年,RSA 會議將討論一個十分熱門的話題:人工智能(AI)如何滲透全球。
AI 已經成為現代科技中的一個關鍵詞,它可以幫助我們完成許多複雜的任務,例如圖像識別、語音識別、自然語言處理、自動化決策等。但同時,AI 也帶來了許多挑戰,特別是在資訊安全領域。
首先,AI 可能被用於攻擊。黑客可以利用 AI 技術來創造出更加智能化、有效的攻擊手段。例如,他們可以使用機器學習算法來進行釣魚攻擊,或者使用生成對抗網路(GAN)來創造出高度逼真的假新聞和假影像。這樣一來,攻擊者可以更加容易地欺騙受害者,導致更多的損失。其次,AI 還可能被用於加強防禦。安全專家可以使用 AI 來分析大量的資訊,從中識別出潛在的威脅和漏洞。他們還可以使用 AI 來創造出更加強大的安全系統,例如自動化防禦系統和入侵偵測系統。這樣一來,企業和組織就可以更加迅速地應對安全威脅,減少損失。
此外,AI 還可以用於改進身份驗證系統。現在,大部分的身份驗證系統都是基於密碼和用戶名來進行驗證的,但這種方式很容易被黑客破解。AI 可以提供更加安全的身份驗證方式,例如基於生物特徵的驗證,例如指紋識別、臉部識別和聲音識別。這樣一來,我們就可以更加確保用戶的安全,防止未經授權的訪問和信息泄漏。
總的來說,AI 的滲透將為資訊安全領域帶來許多新的挑戰和機會。在面對這些挑戰時,我們需要保持警惕,並採取相應的防禦措施。同時,我們還應該充分利用 AI 的優勢,創造出更加智能化、高效的安全系統。在 RSA 會議上,眾多安全專家和業界人士將分享他們的經驗和見解,討論 AI 如何影響資訊安全領域以及未來的發展趨勢。我們相信,在 AI 的幫助下,我們可以創造出更加安全、更加智能化的世界。
在這個充滿挑戰和機遇的時代,我們需要保持開放的心態,不斷學習和探索,才能跟上時代的步伐,應對未來的挑戰。讓我們一起期待 RSA 會議 2023 的精彩演講和討論,為資訊安全領域的發展做出更多的貢獻。
關於Version 2
Version 2 Digital 是立足亞洲的增值代理商及IT開發者。公司在網絡安全、雲端、數據保護、終端設備、基礎設施、系統監控、存儲、網絡管理、商業生產力和通信產品等各個領域代理發展各種 IT 產品。透過公司龐大的網絡、通路、銷售點、分銷商及合作夥伴,Version 2 提供廣被市場讚賞的產品及服務。Version 2 的銷售網絡包括台灣、香港、澳門、中國大陸、新加坡、馬來西亞等各亞太地區,客戶來自各行各業,包括全球 1000 大跨國企業、上市公司、公用事業、醫療、金融、教育機構、政府部門、無數成功的中小企及來自亞洲各城市的消費市場客戶。
關於ESET
ESET成立於1992年,是一家面向企業與個人用戶的全球性的電腦安全軟件提供商,其獲獎產品 — NOD32防病毒軟件系統,能夠針對各種已知或未知病毒、間諜軟件 (spyware)、rootkits和其他惡意軟件為電腦系統提供實時保護。ESET NOD32佔用 系統資源最少,偵測速度最快,可以提供最有效的保護,並且比其他任何防病毒產品獲得了更多的Virus Bulletin 100獎項。ESET連續五年被評為“德勤高科技快速成長500 強”(Deloitte’s Technology Fast 500)公司,擁有廣泛的合作夥伴網絡,包括佳能、戴爾、微軟等國際知名公司,在布拉迪斯拉發(斯洛伐克)、布裏斯托爾(英國 )、布宜諾斯艾利斯(阿根廷)、布拉格(捷克)、聖地亞哥(美國)等地均設有辦事處,代理機構覆蓋全球超過100個國家。


RSA 會議 2023:人工智能慧如何滲透全球

RSA 會議是全球資訊安全領域的一個重要活動,每年都吸引了眾多安全專家和業界人士參加。今年,RSA 會議將討論一個十分熱門的話題:人工智能(AI)如何滲透全球。
AI 已經成為現代科技中的一個關鍵詞,它可以幫助我們完成許多複雜的任務,例如圖像識別、語音識別、自然語言處理、自動化決策等。但同時,AI 也帶來了許多挑戰,特別是在資訊安全領域。
首先,AI 可能被用於攻擊。黑客可以利用 AI 技術來創造出更加智能化、有效的攻擊手段。例如,他們可以使用機器學習算法來進行釣魚攻擊,或者使用生成對抗網路(GAN)來創造出高度逼真的假新聞和假影像。這樣一來,攻擊者可以更加容易地欺騙受害者,導致更多的損失。其次,AI 還可能被用於加強防禦。安全專家可以使用 AI 來分析大量的資訊,從中識別出潛在的威脅和漏洞。他們還可以使用 AI 來創造出更加強大的安全系統,例如自動化防禦系統和入侵偵測系統。這樣一來,企業和組織就可以更加迅速地應對安全威脅,減少損失。
此外,AI 還可以用於改進身份驗證系統。現在,大部分的身份驗證系統都是基於密碼和用戶名來進行驗證的,但這種方式很容易被黑客破解。AI 可以提供更加安全的身份驗證方式,例如基於生物特徵的驗證,例如指紋識別、臉部識別和聲音識別。這樣一來,我們就可以更加確保用戶的安全,防止未經授權的訪問和信息泄漏。
總的來說,AI 的滲透將為資訊安全領域帶來許多新的挑戰和機會。在面對這些挑戰時,我們需要保持警惕,並採取相應的防禦措施。同時,我們還應該充分利用 AI 的優勢,創造出更加智能化、高效的安全系統。在 RSA 會議上,眾多安全專家和業界人士將分享他們的經驗和見解,討論 AI 如何影響資訊安全領域以及未來的發展趨勢。我們相信,在 AI 的幫助下,我們可以創造出更加安全、更加智能化的世界。
在這個充滿挑戰和機遇的時代,我們需要保持開放的心態,不斷學習和探索,才能跟上時代的步伐,應對未來的挑戰。讓我們一起期待 RSA 會議 2023 的精彩演講和討論,為資訊安全領域的發展做出更多的貢獻。
關於Version 2
Version 2 Digital 是立足亞洲的增值代理商及IT開發者。公司在網絡安全、雲端、數據保護、終端設備、基礎設施、系統監控、存儲、網絡管理、商業生產力和通信產品等各個領域代理發展各種 IT 產品。透過公司龐大的網絡、通路、銷售點、分銷商及合作夥伴,Version 2 提供廣被市場讚賞的產品及服務。Version 2 的銷售網絡包括台灣、香港、澳門、中國大陸、新加坡、馬來西亞等各亞太地區,客戶來自各行各業,包括全球 1000 大跨國企業、上市公司、公用事業、醫療、金融、教育機構、政府部門、無數成功的中小企及來自亞洲各城市的消費市場客戶。
關於ESET
ESET成立於1992年,是一家面向企業與個人用戶的全球性的電腦安全軟件提供商,其獲獎產品 — NOD32防病毒軟件系統,能夠針對各種已知或未知病毒、間諜軟件 (spyware)、rootkits和其他惡意軟件為電腦系統提供實時保護。ESET NOD32佔用 系統資源最少,偵測速度最快,可以提供最有效的保護,並且比其他任何防病毒產品獲得了更多的Virus Bulletin 100獎項。ESET連續五年被評為“德勤高科技快速成長500 強”(Deloitte’s Technology Fast 500)公司,擁有廣泛的合作夥伴網絡,包括佳能、戴爾、微軟等國際知名公司,在布拉迪斯拉發(斯洛伐克)、布裏斯托爾(英國 )、布宜諾斯艾利斯(阿根廷)、布拉格(捷克)、聖地亞哥(美國)等地均設有辦事處,代理機構覆蓋全球超過100個國家。


CVE-2021-45456 Apache Kylin RCE Exploit
Introduction
This is an exploitation script written in Python to exploit #Apache #Kylin Command Injection #CVE-2021-45456 and get RCE.
You can find the script here: https://github.com/mhzcyber/CVE-Analysis/blob/main/CVE-2021-45456/CVE-2021-45456Exploit.py
To understand more about the CVE, you can check the previous PoC and Analysis blog that we published.
https://www.vicarius.io/vsociety/blog/cve-2021-45456-apache-kylin-rce-poc
https://www.vicarius.io/vsociety/blog/cve-2021-45456-apache-kylin-command-injection
Testing Lab
The lab here is the same as the one mentioned in the analysis blog, but we will add a minor modification.
Since this is a docker container, it’s minimalized with the requirements only to run the solution.
Usually, we have more features to abuse in the system, for example, netcat or nc, so we are going to install nc.
Access the container using the following command:
sudo docker exec -it container_id bash
Install nc
yum install nc -y
Exploitation Script
We are going to start by explaining the script
The script starts with defining the libraries

create_project function
After that, we have the
create_projectfunction, where we create a project and inject the malicious payload.
The function takes the following args host, lhost, lport, username, password
Those args are entered by the user when running the script.
This line checks if there is “.” in the lhost and removes them.
so if the lhost is 172.17.0.2 the result is 1721702
if "." in lhost:
lhost = lhost.replace(".", "")structuring the URL
url = f"http://{host}/kylin/api/projects"
takes the username and password and encodes them with base64 to create basic auth.
auth_header = f"Basic {base64.b64encode(f'{username}:{password}'.encode('ascii')).decode('ascii')}"
Structuring the headers, and the project data which includes the name, description ..etc, we have also the project_desc_data with is the project data but in a JSON format

Proxy setting to be able to intercept the requests from the script

Send the HTTP request, and check for the error message if the project already existed.
If the HTTP code is 200 which means the request success
It will retrieve the jsessionid
If there’s some other error it will be printed and it will return none

trigger_diagnosis function
The function takes those args host, jsessionid, lhost, lport
all entered by the user except jessionid returned from create_project function.
Structuring the project_name i.e. the malicious payload, the URL to trigger the exploitation, and the headers.

Proxy setting to be able to intercept the requests from the script

Send the request, if it’s 200 OK, it will print “[+] Request is successful.”
otherwise, it will print the error code.

Here’s a banner with usage instructions and example.
Unless there are 5 args entered, the tool will exit.

The returned value of jsessionid from create_project function is stored in the variable jsessionid
it checks if jsessionid variable is not none and has the value false, it runs the trigger_diagnosis function. otherwise, it will quit.

Run the exploitation script
I’m going to run the exploit and use the proxy to intercept the requests in burpsuite demonstrating better understanding.
This is the
create_projectfunction request

This is the
trigger_diagnosisfunction request

Received a connection and gained access

Video of the exploitation tool from here:
https://youtu.be/gg8Qrs-zo_E
About Version 2 Digital
Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.
Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.
About VRX
VRX is a consolidated vulnerability management platform that protects assets in real time. Its rich, integrated features efficiently pinpoint and remediate the largest risks to your cyber infrastructure. Resolve the most pressing threats with efficient automation features and precise contextual analysis.


CVE-2021-45456: Apache Kylin Command Injection
Introduction
Command injection in #Apache #Kylin has been found and registered as #CVE-2021-45456
Apache Kylin is an open-source distributed analytics engine designed to provide a SQL interface and multi-dimensional analysis on Hadoop and Alluxio supporting extremely large datasets. It was originally developed by eBay, and is now a project of the Apache Software Foundation.
Background Story
The basic story behind this vulnerability is that the user can create a project, and dump diagnosis information of that project. in order for the solution to dump the diagnosis information it executes a script. Since the project name is controlled by the user, the user can enter the project name as a Linux command but without characters or spaces, after that When the user sends the request of the diagnosis, can modify the project name (i.e. the Linux command) and add spaces and other needed characters but URL-encoded so the command will be a valid command. The solution will process this request, decode the project name, and treat it as a Linux command in the execution process, therefore, it will execute the malicious payload.Build the lab
I’m using docker on Ubuntu server 20.04Install docker
apt updateapt install docker docker-compose
Install Apache Kylin
docker pull apachekylin/apache-kylin-standalone:4.0.0
sudo docker run -d \-m 8G \-p 7070:7070 \-p 8088:8088 \-p 50070:50070 \-p 8032:8032 \-p 8042:8042 \-p 2181:2181 \-p 1337:1337 \--name kylin-4.0.0 \apachekylin/apache-kylin-standalone:4.0.0
Setup the debugger
First, configure the kylin.sh filedocker exec -it container_id bash- file path
/home/admin/apache-kylin-4.0.0-bin-spark2/bin/kylin.sh - Under the
retrieveStartCommand()function which is the start command function. line number 267
- Scroll down to line number 307, the line starts with the following
$JAVA ${KYLIN_EXTRA_START_OPTS} ${KYLIN_TOMCAT_OPTS} - Add the following
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1337
- Restart the container
docker container restart container_id - Login to Kylin, port is 7070. I’m using the docker ip, you can also use the localhost IP.
- Creds
admin:KYLIN
- Configure the debugger in Intellij IDEA
Reproduce the vulnerability
Based on the advisory, we will create a project with command injected e.g.touchpwned
and after that, we will dump the diagnosis information for the project, but while we are doing this we will modify it using burpsuite to trigger the command injection, therefore, triggering the exploit.
- Once you click “Diagnosis”, intercept the request
- Change the name touchpawned to
%60touch%20pawned%60which the URL-encoded result of the following:`touch pawned`
- Now, check the container
We demonstrated how you can gain access to the target and leverage this to RCE in the PoC blog from here:
https://www.vicarius.io/vsociety/blog/cve-2021-45456-apache-kylin-rce-poc
Static Analysis & Debugging
NOTE: to run Kylin solution you run other apache solutions along with it, and this includes spark, Kafka, hbase, hive, spring …etc. therefore the debugging won’t be as detailed as usual because it will take it us into the source code of the other solutions.Find an entry point
Based on the advisory the vulnerability happens in dumpProjectDiagnosisInfo method, but I want to go through how it handles the request, how the project gets created, how the name got stored, and how the vulnerability gets triggered with the latest request we saw.- I searched for “projects” and found the “ProjectController.java”. This class here responsible for listing all projects, saving the project, updating the project, deleting the project, updating the project owner, and basically most of the project functions.
- I set a few breakpoints as you can see and I created a new project called “test1”, you can see this in
projectDescDatavariable the values of the project.
Understand how the project gets created and saved
- So first time we create a project, the solution will use the
saveProjectmethod. Let’s go through this method real quick.
@RequestMapping(value = "", method = { RequestMethod.POST }, produces = { "application/json" }): This line is an annotation that maps the method to the endpoint for creating a new project instance. It specifies that the endpoint should accept a POST request with an empty URL and that it should produce a JSON response.
@ResponseBody: This annotation is used to indicate that the method’s return value should be written directly to the response body.
public ProjectInstance saveProject(@RequestBody ProjectRequest projectRequest): This line defines the method signature, which includes aProjectRequestobject as the request body and returns aProjectInstanceobject.
if (StringUtils.isEmpty(projectDesc.getName())): This line checks whether thenamefield of theProjectInstanceobject is empty.
if (!ValidateUtil.isAlphanumericUnderscore(projectDesc.getName())): This line checks whether thenamefield of theProjectInstanceobject contains only alphanumeric characters and underscores.throw new BadRequestException(: If thenamefield does not contain only alphanumeric characters and underscores, aBadRequestExceptionis thrown.
ProjectInstance createdProj = null;
try {
createdProj = projectService.createProject(projectDesc);
} catch (Exception e) {
throw new InternalErrorException(e.getLocalizedMessage(), e);
}
This snippet here creates a new ProjectInstance object named createdProj and sets it initially to null. It then tries to create a new project using a projectService object and the projectDesc parameter passed to the createProject method.
If the project creation is successful, the createdProj object will be assigned the newly created project instance. If an exception is thrown during the project creation process, the catch block will be executed.
return createdProj;: This line returns thecreatedProjobject, which contains the newly created project instance
How the diagnosis request get proceeded & how the command gets executed
- It all starts from the
dumpProjectDiagnosisInfomethod, set the breakpoints.
- Now click on “Diagnosis” in the website. you can always see variables and their values right there.

- The important line for me is the following
String filePath = dgService.dumpProjectDiagnosisInfo(project, diagDir.getFile());
- We have here the
dumpProjectDiagnosisInfo, now follow this and you will find yourself inDiagnosisService.javafile
- Keep following with the debugger, now this is another interesting
String[] args = { project, exportPath.getAbsolutePath() };
This is an array named args and it contains the project name along with the exportPath which is the diagnosis data path and it’s using the getAbsolutePath() method.
The getAbsolutePath() method is a part of the File class. This function returns the absolute pathname of the given file object.
- After that we see
runDiagnosisCLI(args)takes the args array as input. - Step-in, and here is the
runDiagnosisCLI()method, and we can see the args with the values right there.
File script = new File(KylinConfig.getKylinHome() + File.separator + "bin", "diag.sh");
This line of the method creates a new File object representing a shell script named “diag.sh” located in the “bin” directory of the Kylin configuration directory.
If the script does not exist, the method throws a BadRequestException with a message that indicates the file could not be found.
- Now, we have diagCmd variable which has the script path and the args.
- Step-in, and click
getCliCommandExecutor()
- This will take you to
getCliCommandExecutorand this method determines if it will get the remote access configuration of a Hadoop cluster or not to execute commands on it, i.e. remote commands. if the value retrieved is null in regards to the remote access configuration of the Hadoop cluster, and this is what happened in our case, the commands will be executed locally.
- You can see the value of
executorreturned
We have here kinda two versions of the execute method in the CliCommandExecutor calls. both of the methods execute a shell command and return a Pair object containing the exit code and output of the command.
We can see the first execute method takes only one argument: String command. Then, it calls the second execute method with the same command argument, along with a default logAppender of new SoutLogger() and a jobId of null.
The second execute method takes the command, a logAppender (which is a logger instance that is used to log the output of the command), and a jobId (which is an optional identifier that can be used to track the execution of the command).
The method then checks if a remote host has been specified for the CliCommandExecutor instance. If not, it runs the command locally using the runNativeCommand method, passing in the command, logAppender, and jobId. This method executes the command using a ProcessBuilder and captures the output and exit code of the command.
If a remote host has been specified for the CliCommandExecutor instance, the execute method instead runs the command on the remote host using the runRemoteCommand method.
Finally, the method checks the exit code of the command. If the exit code is non-zero, the method throws an IOException with an error message containing the exit code, error message, and command itself.
Since we know that the command execution will happen locally, I added new breakpoints
Step-in to follow runNativeCommand method since it’s the method that will execute the command.
Obviously, the code defines a private method runNativeCommand which is called by the execute method in the same class, and it executes a shell command using ProcessBuilder and returns a Pair object containing the exit code and output of the command.
The method takes three arguments: command (which is the shell command to be executed), logAppender (which is a logger instance that is used to log the output of the command), and jobId (which is an optional identifier that can be used to track the execution of the command).
The method first constructs an array cmd of strings, which contains the command and its arguments. The cmd array is constructed differently depending on the operating system: for Windows, the command is executed using cmd.exe /C, while for other operating systems (such as Linux or macOS), the command is executed using /bin/bash -c.
Then, the method constructs a ProcessBuilder instance using the cmd array and sets the redirectErrorStream property to true, which means that any error messages produced by the command will be redirected to the same output stream as the command’s standard output.
The method then starts the process using ProcessBuilder.start() and registers it with a JobProcessContext if a jobId is provided.
The method then reads the command’s standard output line by line using a BufferedReader, and appends each line to a StringBuilder. For each line, if a logAppender is provided, the line is logged using the Logger.log() method.
If the method is interrupted by another thread (as determined by Thread.interrupted()), it destroys the process and returns a Pair object with an exit code of 1 and a message of “Killed”.
If the command execution completes successfully, the method waits for the process to exit using Process.waitFor() and returns a Pair object with the exit code and output of the command.
Finally, the method checks if the jobId is not null removes the process from the JobProcessContext .

You can see from here how the variables get set along the execution of the software.
Those are all the variables after the runNativeCommand is done.
From here it will return to r = runNativeCommand(command, logAppender, jobId); and now it’s a matter of sending the command output back in the response.
How the execution looks like with an injected malicious payload
Since we understood in-depth how everything gets processed in the previous section, now I will just show screenshots of how it looks like with an injected malicious payload. Follow the same steps in the “Reproduce the vulnerability” section, but instead of sending the request through burpsuite. Send the request from the browser, so you can follow it in the debugger:
The basic idea here is that you send the request with the project name edited and encoded.
The server behind the solution decodes the payload, so now it’s just a normal Linux command.
So, the basic structure of the command as we saw before is “script (dig.sh)” + “project name” + “folder”, and there’s where the injection happens in the project name, so the normal project name is now replaced with the payload. and this is what will be executed.
The root cause
I understood the root cause after the patch diffing. as it’s explained in the patch diffing, they replaced “project” with “projectName” and the reason is when you follow the debugger you will notice that “project” it’s just the name of the project name as it’s submitted (which is controlled by the user) after decoding. so when the attacker submits the malicious payload, the solution decodes it and passes it as it is a payload. The projectName it’s the real name with no characters or spaces.
Once you follow
ProjectManager.getInstance(KylinConfig.getInstanceFromEnv())
You will notice the projectName variable value
This is how it looks like after that
Patch Diffing
The fix link from here: https://github.com/apache/kylin/commit/f4daf14dde99b934c92ce2c832509f24342bc845#diff-5ca0e5634941e5810bc535c8084b3f11f9dce8cbb513500ec22db6a3a69ec930L97
As we can see the project variable was replaced with the projectName variable, and based on what we explained in the root cause of the vulnerable we understand that by replacing the project with projectName we eliminate the danger of the malicious payload injection.
Mitigation
Update Apache to the latest version.Final Thoughts
This software was a real joy, the dependency between multiple solutions makes it a little bit harder to debug, but I tried my best to make it focus on Apache Kylin only. How the payload gets structured in order to be injected it’s really interesting and fun.Resources:
- https://securitylab.github.com/advisories/GHSL-2021-1048_GHSL-2021-1051_Apache_Kylin/
- https://github.com/apache/kylin/commit/f4daf14dde99b934c92ce2c832509f24342bc845#diff-5ca0e5634941e5810bc535c8084b3f11f9dce8cbb513500ec22db6a3a69ec930L97
- https://kylin.apache.org/docs/install/index.html
- https://github.com/apache/kylin
About Version 2 Digital
Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.
Through an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.
About VRX
VRX is a consolidated vulnerability management platform that protects assets in real time. Its rich, integrated features efficiently pinpoint and remediate the largest risks to your cyber infrastructure. Resolve the most pressing threats with efficient automation features and precise contextual analysis.







