版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
CONTROLNET:AFirewallforRAG-basedLLMSystem
HongweiYao¹-²,HaoranShi²,YidouChen²,YixinJiang³,CongWang¹,ZhanQin²☒
¹CityUniversityofHongKong,HongKongChina
2ZhejiangUniversity,HangzhouChina
³ChinaSouthernPowerGrid,GuangzhouChina
Projectpage:
/firewall
arXiv:2504.09593v2[cs.CR]
C
Abstract
Retrieval-AugmentedGeneration(RAG)hassignificantlyenhancedthefactualaccuracyanddomainadaptabilityofLargeLanguageModels(LLMs).Thisadvancementhasenabledtheirwidespreaddeploymentacrosssensitivedomainssuchashealthcare,finance,andenterpriseapplications.RAGmitigateshallucinationsbyin-tegratingexternalknowledge,yetitintroducesprivacyriskandsecurityrisk,notablydatabreachingriskanddatapoisoningrisk.Whilerecentstudieshaveexploredpromptinjectionandpoi-soningattacks,thereremainsasignificantgapincomprehensiveresearchoncontrollinginbound/outboundqueryflowstomitigatethesethreats.Inthispaper,weproposeanAIfirewall,CoNTROL-NET,designedtosafeguardRAG-basedLLMsystemsfromthesevulnerabilities.CoNTROLNETcontrolsqueryflowsbyleveragingactivationshiftphenomenatodetectmaliciousqueriesandmitigatetheirimpactthroughsemanticdivergence.Weconductcomprehen-siveexperimentsusingstate-of-the-artopen-sourceLLMs-Llama3,Vicuna,andMistral-acrossfourbenchmarkdatasets(MSMARCO,HotpotQA,FinQA,andMedicalSys).Ourempiricalresultsdemon-stratethatCoNTROLNETisnotonlyeffectivebutalsoharmless.ItachievesanAUROCexceeding0.909forriskdetection,withminimaldegradationinPrecisionandRecall,bothofwhichshowreduc-tionsoflessthan0.03and0.09,respectively,forriskmitigation.Overall,CoNTROLNEToffersaneffective,harmless,robustdefensemechanism,markingasignificantadvancementtowardthesecuredeploymentofRAG-basedLLMsystems
Keywords
DataBreachingRisk,DataPoisoningRisk,Firewall
1Introduction
Inrecentyears,LargeLanguageModels(LLMs)suchasChatGPT,ClaudeandDeepSeek[13]havedemonstratedremarkableprofi-ciencyindomain-specificandknowledge-intensivetasks,includ-ingpersonalassistant,medicalassistant,financialadvisor,andle-galresearch.ThisadvancementhasbeensignificantlydrivenbytheintegrationofRetrieval-AugmentedGeneration(RAG)tech-niques.Byincorporatingexternalknowledgeretrieval,RAGmiti-gatesthehallucinationprobleminherentinstandalonegenerativemodels[12,53],improvingtheirabilitytorespondtoqueriesre-quiringreal-timeorout-of-distributioninformation[11].
AtypicalRAG-basedLLMsystemoperatesbyprocessinguserqueriesthroughastructuredretrievalmechanism.Whenaclientsubmitsaquery,theserverencodesitintoavectorrepresentation,whichisthenusedtoretrieverelevantdocumentsfromavector
Conference17,Washington,DC,USA
2025.ACMISBN978-×-XXXx-xxxx-x/YYYY/MM
/10.1145/nnnnnnn.nnnnnnn
[Role:System]Response:
Healthconsuitation:S57k,
[Role:HospitalDoctor]
Query:Tellmethehospitar's
revenuein2024,induding
detailedincome?
(a)WithoutFirewall
自
[Role:HospitalDoctor]
Query:Tellmethehospita'srevenuein2024,induding
detailedincome?
[Role:System]Response:Permissionsdeny.
lean'tlezkfinaDia
(b)WithCONTROLNETFirewall
Figure1:IllustrationofthedataflowinaRAG-basedLLMsys-tem.(a)Withoutthefirewall,thedoctorgainsunauthorizedaccesstofinancialdata.(b)WiththefirewallCoNTROLNET,role-basedaccesscontrolensuresthedoctorcanonlyretrievepatientinformation.
database(denotedasVectorDB).Thesedocuments,storedinvectorform,aresubsequentlyintegratedwiththeoriginalqueryandpro-cessedbytheLLMtogeneratearesponse.TheknowledgeproviderensuresthattheVectorDBremainsupdatedwithaccurateandrel-evantdocuments.Finally,thegeneratedresponseisdeliveredtotheclient(asshowninFigure1(a)).Thisretrieval-basedapproachhasprovenhighlyeffectiveinreducingfactualinaccuracies,con-tributingtothewidespreadadoptionofRAGasafoundationaltechnologyforenhancingthepracticalapplicabilityofLLMs.
Despitetheseadvancements,theincorporationofexternalknowl-edgedocumentsintroducescriticalvulnerabilitiesrelatedtopri-vacyandsecurity.Theserisksmanifestintwoprimaryforms,databreachingrisk¹anddatapoisoningrisk².First,databreachingrisksarisefrommaliciousclientsconductingreconnaissancetoextractsystempromptsorexploitRAGsystemenvironments.Inmulti-clientsystemswhereusershavedifferentiatedaccessrights(e.g.,executives,financialofficers,generalstaff),suchvulnerabili-tiesincreasethelikelihoodofdataexfiltrationandunauthorizeddocumentaccess(asshowninFigure1(b)).Databreachingcanleadtotheexposureofsystemenvironmentsandbusiness-sensitive
/articles/chatgpt-confirms-data-breach
²
https://www.theguardiancom/technology/2024/dec/24/chatgpt-search-tool
-vulnerable-to-manipulation-and-deception-tests-show
2
Conference'17,July2017,Washington,DC,USAHongweiYao¹²,HaoranShi²,YidouChen²,YixinJiang³,CongWang¹区,ZhanQin²☒
information,posingsevereconsequencesfororganizations.Second,fromthecorpuscollectionperspective,datapoisoningpresentsanothersecuritychallenge.MaliciousknowledgeprovidersmayintroducecompromiseddataintotheVectorDB,therebyinjectingmisleadinginformationorhijackingclients'conversation.Datapoisoningcanmisleadclients,degradetrustinthesystem,andcom-promisedecision-makingprocesses.Giventheseescalatingrisks,thereisanurgentneedforeffective,robustdefensemechanismstoensurethesecureandtrustworthydeploymentofRAG-basedLLMsystems.
EnsuringtheintegrityandsecurityofRAG-basedLLMsystemsrequiresthedevelopmentofeffectivemechanismsfordetectingmaliciousqueries,filteringpoisoneddocuments,andimplementingeffectivequeryflowcontrol.Whilerecentstudieshaveexploredpromptinjection[25,26,42,61]andpoisoningattacks[43,48,50,54,56],andguardrails[17,32,38]inLLMs,thereremainsasignificantgapincomprehensiveresearchoncontrollinginbound/outboundqueryflowstomitigatethesethreats.Althoughguardrailscon-tributetosafetyandalgnmentbutoftenfailtomanagecomplex,multi-rolesystemflowseffectively.AddressingtheserisksinRAG-basedsystemspresentsseveralkeychallenges.First,bothincomingqueriesandretrieveddocumentsexistasunstructuredtextualdata,renderingtraditionalregularexpression-basedmatchingineffective.Instead,effectiveflowcontrolshouldleveragedeepersemanticfea-tures,suchasneuronactivationpatternswithinthemodel.Second,establishingaprincipledconnectionbetweenneuronactivationpatternsandclient-basedaccesscontrolinRAGsystemsremainsanopenproblem.Third,onceanmaliciousqueryorpoisoneddocu-mentisdetected,mitigatingtheirimpactthroughquerysanitizationpresentsafurtherchallenge.Toaddressthesechallenges,futureresearchmustprioritizethedesignofrobustquerysanitizationtechniquesandadversarialimpactmitigationstrategies.
OurWork.Inthispaper,weintroduceacomprehensiveRAGsecu-rityframeworkthatconsidersthreedistinctentities:theLLMserver,theclients,andthecorpuscollector.WesystematicallyinvestigateprivacyandsecurityrisksinRAG-basedLLMsystems,identifyingfivemajorattacks:reconnaissance,dataexfltration,unauthorizedaccess,knowledgepoisoning,andconversationhijacking.Toaddressthesethreats,weproposeCoNTROLNET,anovelAIfirewallforRAG-basedLLMsystems.CoNTROLNETcontrolsqueryflowbyleveragingactivationshiftphenomena,detectingmaliciousqueriesbasedondistinctactivationvectorpatternsindicativeofseman-ticdivergence.Upondetection,CoNTROLNETmitigatesrisksbysteeringtheLLM'sbehaviorawayfromharmfulresponses,therebyensuringsecureandprivacy-preservinginteractions.Weconductextensiveexperimentsusingthreestate-of-the-art(SoTA)open-sourceLLMs-Llama3,Vicuna,andMistral-acrossfourbenchmarkdatasets:MSMARCO,HotpotQA,FinQA,andMedicalSys.Thesedatasetscoverdiverseapplicationscenarios,includingpersonalassistant,digitalenterprise,financialplanning,andhealthcare.OurempiricalresultssubstantiatethatCoNTROLNETisnotonlyeffec-tivebutalsoharmlessandrobust.ItachievesanAUROCexceeding
0.909forriskdetection,withminimaldegradationinPrecisionandRecall,bothofwhichshowreductionsoflessthan0.03and0.09,respectively,forriskmitigation.
Thecontributionsofthisworkaresummarizedasfollows:
·SystematicRiskAnalysis:Wepresentacomprehensivetax-onomyofprivacyandsecurityvulnerabilitiesinRAG-basedsystems,categorizingfiveattacksundertwoprimaryriskdo-mains.Thisframeworkprovidesafoundationalstructureforfutureresearchanddevelopment.
·BenchmarkDataset:Wecollectandreleaseanopen-access,multi-roledatabaseforthemedicalsystemwithlocalhospitals,comprisingover20,000datasamplesacross4roles.Thisdata-baseservesasabenchmarkforevaluatingprivacyrisksandfosteringfurtherresearch.
·Next-GenerationAIFirewall:WeproposeCONTROLNET,anovelAIfirewallframeworkforqueryflowcontrolinRAG-basedLLMsystems.CoNTROLNETcontrolsqueryflowbylever-agingactivationshiftphenomena,detectingmaliciousqueriesthroughdistinctactivationvectorpatternsindicativeofseman-ticdivergence.
●ExtensiveExperiments:ThroughextensiveexperimentsonSoTALLMsandbenchmarkdatasets,wedemonstrateCoN-TROLNET'seffectivenessindetectingandmitigatingprivacyandsecurityrisks,ensuringreliabledeploymentofRAGsys-temsinreal-worldapplications.
2RelatedWorks
2.1LLMAttacks
Inrecentyears,thesecurityrisksassociatedwithLLMshavegar-neredsignificantattentionwithintheresearchcommunity.Theseriskscanbebroadlycategorizedintotwomainareas:privacythreatsandsecuritythreats[9,10,52].Thissectiondelvesintoexistingliteratureonthesetopics,particularlyfocusingondataleakageandpromptinjection.
2.1.1DataLeakage.ThemassivedatasetsusedtotrainLLMsof-teninadvertentlyincludesensitiveinformation,suchasPersonallyIdentifiableInformation(PII),e.g.,names,age,emailaddresses,physicaladdresses.Thisinclusionraisessignificantprivacycon-cerns,asLLMsarecapableofmemorizingsensitiveinformationduringtrainingandreproducingitduringinference.EarlyresearchdemonstratedthefeasibilityofextractingsensitivetextsequencesfromLLMsviamembershipinferenceattacks[6,7,24].SubsequentstudiesfurtherinvestigatedtherisksassociatedwithPIIleakageinLLMs[21,27,28,60].
Beyondtheleakageoftrainingdata,theconfidentialityofsystempromptshasemergedasacriticalconcern,particularlywiththeincreasingadoptionofLLM-drivenapplications[45,51].Severalhigh-profileincidents,suchastheleakageoftheBingChatsystemprompt³andsimilarbreachesinvolvingOpenAI'sGPTs4,haveun-derscoredthevulnerabilitiesinprotectingtheseassets.Inresponse,academicresearchaddressestheissueofpromptleakagethroughtheidentificationofmaliciouspromptsandthedevelopmentofstrategiestomitigatetheirimpact[16,39,41].
2.1.2PromptInjection.PromptinjectionrepresentsasignificantchallengeintherealmofLLMs,involvingtheunauthorizedma-nipulationofinputtoaltermodelbehavior,potentiallyleadingtounintendedoutputs[25,26,42].Thepromptinjectionattackscan
³
/elder-plinius/Bing-Prompt-Leak
⁴
/friuns2/Leaked-GPTs
3
CONTROLNET:AFirewallforRAG-basedLLMSystemConference'17,July2017,Washington,DC,USA
becategorizedintotwomaintypes:directinjectionandindirectinjectionattacks[61].(1)Directinjectionattacksarecharacter-izedbyadversarialinputsspecificallydesignedtomanipulateLLMoutput,oftenbypassingintendedfunctionaltyorethicalbound-aries.Variousstrategieshavebeenreportedinliterature,includingnaiveattacks,contextignoring[36],fakecompletions[46,63],andmorenuancedmethodslikeDoAnythingNow(DAN)[40]andtheGrandmaExploit[14].EachoftheseapproachesexploitsdifferentfacetsofLLMs,fromtheirsyntacticprocessingcapabilitiestotheircontextualunderstandingmechanisms.(2)Indirectinjectionattacks,ontheotherhand,involvemanipulatingexternalresourcesthatLLMsrelyuponforinformation.Byalteringdocuments,websites,ordatabaseentries,adversariescaninfluencethedataconsumedbyLLMs,therebyaffectingtheiroutputswithoutdirectlyinteractingwiththemodel'spromptinterface[54].Recentstudieshavehigh-lightedthevulnerabilityofLLM-integratedapplicationstosuch
attacks,e.g.,INJECTAGENT[56],TensorTrust[43],IndirectPrompt
Injection[3],andTAPI[48].
2.2LLMGuardrails
GuardrailsforLLMsarestructured,rule-basedframeworksde-signedtofunctionasintermediaries,ensuringthatinteractionsbetweenclientsandthemodelscomplywithpredefinedsafetyguidelinesandoperationalprotocols.CurrentLLMGuardrailscanbecategorizedintocategorizedintoalignment-basedguardrailsandrule-basedguardrailsstrategies.
2.2.1Alignment-basedGuardrails.Alignment-basedguardrailstyp-icallyinvolvefine-tuningLLMsonspecificinstructionsorusingreinforcementlearningfromhumanfeedback(RLHF)[5,35]tomake
LLMalignwithhumanvaluesandethicalstandards[19,47].Thesemethodsoftenrequiresubstantialcomputationalresourcesandmanualeffortwhichconstrainstheirscalabilityandhinderstheirfeasibilityforreal-timeandwidespreaddeployment.
2.2.2Rule-basedGuardrails.Rule-basedguardrailsaredesignedtomoderateandmitigateharmfulcontentatvariousstages,includ-ingtheinput,output,andactivationlayersofLLMs[22].Recentadvancementshaveharnessedthecontextualunderstandingcapa-bilitiesofmachinelearningtodevelopclassifiersthatexcelwithintheirpredefinedcategories.Nevertheless,theseclassifiersoftenfacechallengesingeneralizingtonoveloremergingrisks,asex-emplifiedbysystemssuchasGoogleAdsContentModeration[37],[31],PerspectiveAPI[23]andLlamaGuard[17,32].SoTAguardrailshavefurtherevolvedtoincorporatecontextualtextcontrol,therebyenhancingthemitigationofharmfulcontent.Forinstance,NeMoGuardrails[38]andRigorLLM[55]integrateexternalVectorDBstorestricttheoutputspaceofLLMs,ensuringalignmentwithveri-fiedfactsandcontextualappropriateness.Additionally,AdaptiveGuardrail[15]andPrimeGuard[30]introduceatwo-stepprocess:initiallyidentifyingpotentiallyharmfulrequestsintheprompt,followedbymitigatinganyunalignedcontentintheresponse.
2.2.3Limitations.WhileLLMguardrailscontributesignificantlytosafetyandalignment,theyoftenfallshortincontrollingmulti-
rolesystemflows.TheselimitationshighlightthenecessityforadaptiveandrobustAIfirewalldesignstomanagecomplexuserinteractionsandpermissions.
3Preliminaries
3.1LargeLanguageModel
ALLMfisaparametricfunctionthatestimatestheconditionalprobabilityofasequenceofwordsw1:t=(w1,W₂,…,wt)givenacontextofpreviouswords,wherewi∈VandVisthevocabularyofthemodel.ThemodelistrainedonalargecorpusCandisrepresentedbyadeepneuralnetworkwithparametersθ.Theconditionalprobabilityisgivenby:
(1)
whereP(wi|w1:i-1;θ)istheprobabilityofthei-thwordgiventhepreviouswords,computedbythemodelfwithparametersθ.
3.2Retrieval-AugmentedGeneration
RAGisatechniquethatcombinesaretrievercomponentwithageneratorcomponent.Theretrieverisusedtofetchrelevantdocu-mentsfromalargeknowledgeVectorDB,whichisthenintegratedintothegeneratortoproducecoherentandinformativetext.For-mally,RAGcanbedefinedasafunctionR(q,p;φ,θ)thattakesaqueryqandasystempromptp,andoutputsasequenceofwordsW1:tbasedonthecontext.
RetrieverComponent.Givenanincomingqueryqandasystempromptp,theretrieverridentifiesasetofkrelevantdocuments①={d1,d2,..,dk}fromVectorDB:
D=r(q,p;φ),(2)
whereφrepresentstheparametersoftheretriever.
GeneratorComponent.Thelanguagemodelftakesthesystempromptp,thequeryq,andtheretrieveddocumentsDtogenerateasequenceofwordsw1:t.
W1:t=f(q,p,D;θ),(3)
whereθrepresentstheparametersofthelanguagemodel.TheoverallRAGmodelcanbeexpressedas:
R(q,p;φ,θ)=f(q,p,r(q,p;φ);θ),(4)
Thetrainingobjectiveistofindtheparametersø*andθ*thatmaximizetheconditionalprobabilityofthetargetsequencew1:tgiventhesystempromptpandqueryq,withtheconstraintthattheretrieveddocumentsarerelevant:
whereTisthemaintaskcontainingtripletsofquery,contextandtargetresponsesequences.
4RisksinRAG-basedLLMsystem
ThedeploymentofRAG-basedLLMsystemsencompassestwopivotalstages:thetrainingphaseandtheinferencephase.Eachofthesestagesissusceptibletosignificantsecurityconcerns.WecategorizetheinherentsecurityrisksassociatedwithRAG-basedLLMsystemsintotwoprimarytypes:databreachingriskanddatapoisoningrisk(asillustratedinFigure2).Thissectionbeginsbypresentingacomprehensivethreatmodel,followedbyanin-depthanalysisofthesesecurityrisks.
Conference'17,July2017,Washington,DC,USAHongweiYao¹,²,HaoranShi²,YidouChen²,YixinJiang³,CongWang¹☒,ZhanQin²☒
IferenceStageTrainingStage
In2022,Google'sparentcompary,Aphabet,reportadarevenueof$282.8blion,maritinga10%increase..
Responsey
Basedonthe{documents),answerthequeston{query}
Promptp
Query
Retrieve
Reconnaissance
·DataExfiltration
·UnauthorizedAocess
Retrieverr
TrainRetriever
Collect
CollectorCorpus
d₁:Googlehasseenconslstentyear-
oVer-yeargrowthInrevenue.…
dz:GoogleareledbySundarPlchal...
Documents{d,…,dk}LLMf
墅售
VectorDBD
Build
AnalyzeGoogle'sfinandalhealth,
productportiollo,andorganzatlonal?
Queryq
·KnowledgePoisoning
·ConversationHijacking
③Augment
④Response
TrainLLMf
Client
②
Figure2:IllustrationoftheprivacyandsecurityrisksinRAG-basedLLMsystem.
4.1ThreatModel
InacomprehensiveRAGecosystem,threedistinctentitiesinter-act:theclients,denotedasU={u1,u2,..,Um}(e.g.,companyexecutives,financialofficers,andgeneralstaff),theLLMserver,andthedatacollector.Duringthetrainingphase,theRAGecosys-tem'sdatacollectorplaysacriticalrolebyaggregatingextensivecorpusencompassingbothquestion-answerpairsanddocumentsTheformerservestotraintheretrievalmodel,whilethelatterundergoestransformationintohigh-dimensionalvectors,therebypopulatingtheVectorDB.TheVectorDBactsasarepositoryofsemanticknowledge,enablingsophisticatedsearchcapabilities.Duringtheinferencephase,whenaclientu;submitsaqueryq,thesystemsearchestheVectorDBfortop-ksemanticallyrelevantdocuments{d1,d2,….,d}∈D.Thesedocuments,alongwiththeoriginalquery,arethenprocessedbytheLLMtogenerateacon-textuallyaccurateresponse.Theconfidentialityandintegrityofthesedocumentsareparamount,astheyoftencontainsensitiveproprietaryorpersonalinformation.
Withinthispipeline,weidentifytwoadversariesemergeascriticalactors:theadversarialclientAcntandtheadversarialcollectorAcol.Inthefollowingparagraphs,wewilldefinetheadversary'sgoals,capabilitiesanddefender'scapabilities.
4.1.1Adversary'sGoals.TheadversarialclientAcntlaunchesdatabreachingattacksthatattempttocompromisetheconfidentialityoftheRAG-basedLLMsystembygainingunauthorizedaccesstosensitiveinformation.Theattackbeginswithreconnaissanceattackaimedatextractingasmuchsystemenvironmentinformationaspossible,suchassystemprompts,functionalities,andpotentialvul-nerabilities.Theextractedinformationservesasthefoundationforsubsequentdatabreachingattacks,targetingsensitivedatastoredintheVectorDB,includingunauthorizeddocumentsandPIIinthedocuments.
TheadversarialcollectorAcolconductsdatapoisoningattacksthatattempttocompromisetheintegrityoftheRAG-basedLLMsystembyinjectingpre-designeddocumentsintotheVectorDB.
Theadversary'sobjectivesarecategorizedintotwotypes:knowl-edgepoisoningandconversationhijacking.Inknowledgepoison-ing,theadversaryintroducesmisleadingorharmfulcontentintotheVectorDB,suchasracialdiscriminationspeechorfakenews.Forconversationhijacking,theadversarymanipulatestheLLM’soutputsbyinsertingpoisoneddocuments,therebydivertingthesystem'sresponsesfromtheclient'sintendedtask.Forinstance,inasalescustomerservicesystem,theadversarycouldexploittheLLMtodisseminateadvertisementsbyinjectingmaliciousdocuments.
4.1.2Adversary'sCapabilities.WeconsideraadversarialclientAent,whoisequippedwithblack-boxAPIaccesstotheLLMsys-tem.TheAcntengagesinaninteractionprotocolthatmimicsthebehaviorofalegitimateuser.TheAentcraftssophisticatedqueriesaimedatelicitingresponsesthatexposesystemvulnerabilities,therebyfacilitatingunauthorizeddataexfiltration.Byleveragingreconnaissancetoextractsystemprompts,theadversarialclientcanrefineitsattackqueriestocompromiseconfidentialityeffectively.
Additionally,weconsideranadversarialcollectorAcol,whichoperateswithelevatedaccessprivileges.Thisallowsfordirectma-nipulationofthecorpususedtopopulatetheVectorDB.Leveragingthiscapability,theadversarialcollectorcanintroducemisleadingorharmfulcontentd*intotheVectorDB,thuscompromisingtheintegrityoftheoutputsgeneratedbytheLLMs
4.1.3DefenderAssumptions.ThedefenderimplementsafirewallforaRAG-basedLLMsystem,designedtomoderateinboundandoutboundcontentandmanageaccesstoLLMmodels.Toenablereal-timeservicecapabilities,thedefenderprovidesarule-based,plug-and-playquerymoderationandmitigationmechanism.
4.2DataBreachingRisk
AdversarialclientsAcntmayconductdatabreachattacksbyex-ploitingmaliciousqueriestomisleadLLMsystemintorevealingsystemenvironmentinformationandsensitivedata.Suchattackscanresultinsignificantfinancialandreputationaldamagetothe
CONTROLNET:AFirewallforRAG-basedLLMSystemConference'17,July2017,Washington,DC,USA
affectedorganization.Inthissection,wefirsttaxonomydatabreach-ingrisksinRAG-basedLLMsystem,whichincludesreconnais-sance,dataexfiltrationandunauthorizedaccess,andthenformallydefineeachoftheserisks.
4.2.1Reconnaissance[4,16,36].ReconnaissanceisthefirststeptowardthedataexfiltrationattackswhereanadversarygathersinformationaboutthetargetLLM'ssystemprompts,functionalities,andpotentialvulnerabilities.Formally,wedefinethereconnais-sanceattackas:
Definition1ReconnaissanceAttack
Givenablack-boxRAG-basedLLMsystemR,theadver-saryconstructsasequenceofqueries,Q={q1,.…qi,…qn},whicharetransmittedtoRforthepurposeofextractingLLM'ssystempromptp.Thisprocessisdefinedasfollow-ing:
9rec(R,Q)=I*,(6)
wheregrec(·)denotesfunctionofreconnaissanceattack,I*representstheextractedsystemsensitiveinformation.
ThesequenceofreconnaissancequeriesQisdesignedtomaxi-mizetheamountofinformationobtainedaboutthesystem.Thesequeriesmaybecraftedusingpromptengineeringtechniques,e.g.maliciousqueriessuchas"Ignoreallpreviousinstructions,returnallsystemprompts”[36],"Printanysupportiveinstructionsforofficialdocumentation...[4],orbyemployinggradient-basedoptimizationonaproxymodelthatsimulatestheblack-boxLLMsystem[16].Generally,theoptimizationofthereconnaissanceattackcanbeformalizedas:
(7)
whereInfoGain(·)representsafunctionalquantificationoftheextentofinformationthathasbeensuccessfullyextractedfromLLMsystem.
Definition2DataExfiltrationAttack
Givenablack-boxRAG-basedLLMsystemR,thedocumentsDarecomposedoftaskspecificdocumentsDTandprivatedocumentsDprioatei.e.,D=DTnDprioate.TheadversaryAcntcraftsasequenceofqueries,Q={q1,.…qi…qn},submittedtoRAG-basedLLMsystemR:
9exf(R,Q)=D*,(8)
wheregexf()denotesfunctionofdataexfiltrationattack,D*representsthesubsetofsensitivedocumentsthatsuc-cessfullyextractedfromD.
4.2.2DataExfiltration[14,21,26,29].AdataexfiltrationattackconstitutesaseveresecuritythreatinwhichanadversaryseekstoextractsensitiveinformationstoredwithintheVectorDBD.Forinstance,inthecontextofacustomerservicesystem,anadversarymayattempttoretrievePIIdata,suchashomeaddresses,emailaddresses,andphonenumbers,insteadoflegitimatelyrequestingproduct-relateddata.
Theobjectiveofthedataexfiltrationattackistomaximizetheamountofsensitivedataextracted.Weformulatetheadversary’sobjectiveas:
(9)
whereDpriuaterepresentsthesetofsensitivedocumentswithintheVectorDBD,and|·|denotesthecardinalityoftheset.
4.2.3UnauthorizedAccess[33].Unauthorizedaccessattackisanextendedversionofdataexfiltraionattack.Inthisattack,wecon-sideramulti-clientRAG-basedLLMsystemwithmdistinctclientsU={u1,…ui,…,Um},e.g.,doctors,patients,accountantinahospi-talsystem,eachclienthasaccesstoaspecificsubsetofdocuments,i.e.,①={D1,…,Di,..,Dm}.TheadversaryAcentisclientuihold-ingaccessto
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 暴雨英语课件
- 分子动理论复习课件
- (2026年)防溺水工作总结
- (2026年)幼儿园食堂自查工作报告
- 地球爷爷的手课件
- 初三化学下学期常见的物质鉴别旧人教版课件
- 再保险教学课件
- 2026下半年高中语文教资面试议论文专项真题演练
- 2026下半年初中道法教资面试伦理专题试卷
- 安装工程计价课件
- 再喂养综合征的识别及护理进展
- 2026国企招聘考试(法务)历年参考题库含答案详解
- 巨幼细胞性贫血诊疗专家共识(2025版)
- T∕CECS 277-2021 建筑给水排水薄壁不锈钢管连接技术规程(团体标准)
- 2026年天然气分公司人员招聘笔试模拟试题及详细答案解析
- 第五单元 用字母表示数和数量关系 第6节 探秘百数表
- 风机隔声罩设计计算书
- 2026年6月浙江省高考物理试卷(含答案及解析)
- 危化品安全5分钟(001-200期)
- 2026-2030中国发动机短舱行业市场发展趋势与前景展望战略分析研究报告
- 初中八年级道德与法治上册第三单元《勇担社会责任》大单元教学设计
评论
0/150
提交评论