A Formal Framework for Specifying and Analyzing Logs
as Electronic Evidence
Eduardo Mazza1, Marie-Laure Potet1, Daniel Le M´etayer2
LISE Project
Funded by the Agence Nationale de la Recherce (ANR-07-SESU-00)
(1) Verimag, Grenoble, France
Motivation
Challenge: to precise legal liability for software Log as digital evidence
More and more necessary
PROBLEM
Actual solutions that define liability are not focused in logs as digital evidence
Works in log analysis show little concern in liability
Proposal
An integrated frameworkfor precisely defining liability and log content as electronic evidence
Outline
Introduction
Logs & Claims Log Functions Log Analyzer Conclusion
Introduction
LISE Project
Contract based environment
Legal aspects studied in previous works [ICSE 2010]
Context:
FAULTS⇒CLAIMS⇒LIABILITY
Two or moreagentssigning a legal contractto precise liability for potentialclaims
Contract – agreement between the agents
Requirements
Description of application
Claims taken into account covered by the contract Evidence agreement
Log content and architecture Log Analyzer
LISE Approach
Two phases
Contractual – requirements and evidence agreement Analysis - when claims appear
Contractual Phase Analysis Phase
Generic model
Use of the B-method – focus on data and behaviour
Assumptions & Key Concepts
Distributed system⇒ distributed logs
Information spread along multiple log files
Communication between agents by message exchange
Well adapted for B2B applications
Logs are grouped by agents
A single log file may contain the information of many agents
Incremental Analysis would be an advantage
Claims may be analyzed in a partial setting of the distributed system Not always possible to immediately obtain all logs
Outline
Introduction
Logs & Claims
Log Functions Log Analyzer Conclusion
Logs
How to represent logs?
Generic model supporting distributed logs
Hypothesis: preserved causality, no loss, no duplication
System specification
AGENT ACTION
Interface:ACTION →AGENT
Logs and log distributions
Event: (Send|Rec,AGENT,AGENT,ACTION)
Log file: F(AGENT)×iseq(EVENTS) Distribution: F(F(AGENT))
Example of Logs
System Specification
Possible log distributions
{Client},{Agency},{Bank},{Hotel} {Client,Agency},{Bank},{Hotel}
Possible logs:
({Client,Agency},[RequestSend,RequestRec, . . .]) ({Hotel},[BookRec,CancelRec, . . .])
Claims
How to represent the claims?
Logs that are concerned by the claim (agents)
A precise characterization when the claim is accepted (log property) A claim consists of:
Aplaintiff (the complaining agent) Adefendant
A logproperty
→ “If thepropertyholds, then the agentdefendant is responsible”.
Properties
Property: F(AGENT)×(LOG FILE 7→BOOL)
Distributed setting ⇒ property for partial distribution
1 Agents concerned with this property
Information needed to verify a property
2 Partial function (w.r.t. agents) that maps a log file to TRUE or
FALSE
Example of Claims
(claim NoRoom)Client requests a reservation and is charged but there is no reservation:
1 NoRoom∈CLAIM∧NoRoom= (Client,Agency,propNoRoom)∧ 2 agents(propNoRoom) ={Client,Agency} ∧
3 val(propNoRoom) =λlog.(agents(log) ={Client,Agency} | RequestSend ∈events(log)∧
DebitSend∈events(log)∧ BookSend 6∈events(log)∧
pos(RequestSend,log)<pos(DebitSend,log))
Client Agency Bank Hotel
Request
Debit
Example of Claims
(claim NoRoom)Client requests a reservation and is charged but there is no reservation:
1 NoRoom∈CLAIM∧NoRoom= (Client,Agency,propNoRoom)∧
2 agents(propNoRoom) ={Client,Agency} ∧
3 val(propNoRoom) =λlog.(agents(log) ={Client,Agency} | RequestSend ∈events(log)∧
DebitSend∈events(log)∧ BookSend 6∈events(log)∧
pos(RequestSend,log)<pos(DebitSend,log))
Client Agency Bank Hotel
Request
Debit
Example of Claims
(claim NoRoom)Client requests a reservation and is charged but there is no reservation:
1 NoRoom∈CLAIM∧NoRoom= (Client,Agency,propNoRoom)∧ 2 agents(propNoRoom) ={Client,Agency} ∧
3 val(propNoRoom) =λlog.(agents(log) ={Client,Agency} | RequestSend ∈events(log)∧
DebitSend∈events(log)∧ BookSend 6∈events(log)∧
pos(RequestSend,log)<pos(DebitSend,log))
Client Agency Bank Hotel
Request
Debit
Example of Claims
(claim NoRoom)Client requests a reservation and is charged but there is no reservation:
1 NoRoom∈CLAIM∧NoRoom= (Client,Agency,propNoRoom)∧ 2 agents(propNoRoom) ={Client,Agency} ∧
3 val(propNoRoom) =λlog.(agents(log) ={Client,Agency} | RequestSend ∈events(log)∧
DebitSend∈events(log)∧ BookSend 6∈events(log)∧
pos(RequestSend,log)<pos(DebitSend,log))
Client Agency Bank Hotel
Request
Debit
Example of Claims
(claim NoRoom)Client requests a reservation and is charged but there is no reservation:
1 NoRoom∈CLAIM∧NoRoom= (Client,Agency,propNoRoom)∧ 2 agents(propNoRoom) ={Client,Agency} ∧
3 val(propNoRoom) =λlog.(agents(log) ={Client,Agency} | RequestSend ∈events(log)∧
DebitSend∈events(log)∧ BookSend 6∈events(log)∧
pos(RequestSend,log)<pos(DebitSend,log))
Client Agency Bank Hotel
Request
Outline
Introduction Logs & Claims
Log Functions
Log Analyzer Conclusion
Log Functions
Motivation:
Manipulate distributed logs w.r.t. concerned agents Log functions:
extract - obtain events in a log concerning a given group of agents
merge - provide the set of logs that respect the causal order of events
Several possible scenarios
Property:
Example of
merge
Client Agency
Request
Cancel
logClient logAgency
merge[logClient,logAgency] ={log1,log2}
log1= ({Client,Agency},[RequestSend,RequestRec,CancelSend])
Outline
Introduction Logs & Claims Log Functions
Log Analyzer
Analyzing a claim
How to establish if a claims should be accepted or rejected?
1 For a given claim (Plain,Def,Prop) select certain logs that have the
information required by Prop (agents(Prop)⊆agents(logs))
2 Merge the selected log files
3 Extract the information required byProp (agents(Prop))
4 Compute the possible set of scenarios where Prop holds.
5 Interpretation of the results by the judge
Two results:
Set of all scenarios
Set of scenarios where property hold
(I) Conclude the investigation⇒accept or reject a claim (II) More data needed
Analyzing a claim
How to establish if a claims should be accepted or rejected?
1 For a given claim (Plain,Def,Prop) select certain logs that have the
information required by Prop (agents(Prop)⊆agents(logs))
2 Merge the selected log files
3 Extract the information required byProp (agents(Prop))
4 Compute the possible set of scenarios where Prop holds.
5 Interpretation of the results by the judge
Two results:
Set of all scenarios
Set of scenarios where property hold
(I) Conclude the investigation⇒accept or reject a claim (II) More data needed
Analyzing a claim
How to establish if a claims should be accepted or rejected?
1 For a given claim (Plain,Def,Prop) select certain logs that have the
information required by Prop (agents(Prop)⊆agents(logs))
2 Merge the selected log files
3 Extract the information required byProp (agents(Prop))
4 Compute the possible set of scenarios where Prop holds.
5 Interpretation of the results by the judge
Two results:
Set of all scenarios
Set of scenarios where property hold
(I) Conclude the investigation⇒accept or reject a claim (II) More data needed
Analyzing a claim
How to establish if a claims should be accepted or rejected?
1 For a given claim (Plain,Def,Prop) select certain logs that have the
information required by Prop (agents(Prop)⊆agents(logs))
2 Merge the selected log files
3 Extract the information required byProp (agents(Prop))
4 Compute the possible set of scenarios where Prop holds.
5 Interpretation of the results by the judge
Two results:
Set of all scenarios
Set of scenarios where property hold
(I) Conclude the investigation⇒accept or reject a claim (II) More data needed
Analyzing a claim
How to establish if a claims should be accepted or rejected?
1 For a given claim (Plain,Def,Prop) select certain logs that have the
information required by Prop (agents(Prop)⊆agents(logs))
2 Merge the selected log files
3 Extract the information required byProp (agents(Prop))
4 Compute the possible set of scenarios where Prop holds.
5 Interpretation of the results by the judge
Two results:
Set of all scenarios
Set of scenarios where property hold
(I) Conclude the investigation⇒accept or reject a claim (II) More data needed
Analyzing a claim
How to establish if a claims should be accepted or rejected?
1 For a given claim (Plain,Def,Prop) select certain logs that have the
information required by Prop (agents(Prop)⊆agents(logs))
2 Merge the selected log files
3 Extract the information required byProp (agents(Prop))
4 Compute the possible set of scenarios where Prop holds.
5 Interpretation of the results by the judge
Two results:
Set of all scenarios
Set of scenarios where property hold
(I) Conclude the investigation ⇒accept or reject a claim (II) More data needed
Log Analyzer
Log Analyzer: tool that computes the two results to be interpreted
INPUT:
logs: set of logs
prop: property
OUTPUT:
scen: all possible scenarios
ok: scenarios where the property holds
scen,ok ←Analysis(logs,prop)
PRE agents(prop)⊆agents(logs) THEN
scen:=extractagents(prop)[merge[logs]]; ok :=scen∩val(prop)−1[{TRUE}] END
Interpreting the results
Depending of the values for scen,ok:
Inconclusive results – results are not enough to provide the intuition for accepting or rejecting a claim
A fine study may be necessary. (incremental analysis)
Some definitive conclusive results situations: ifscen =ok then claim isaccepted
Example of analysis - claim
NoRoom
(paper Example 8)
Client Agency Bank Hotel
Request
Debit Justify
Agency wants to verify if the claim is valid without using Bank’s log
3 scenarios:
RequestSend,RequestRec,DebitSend,JustifyRec
RequestSend,RequestRec,JustifyRec,DebitSend
RequestSend,JustifyRec,RequestRec,DebitSend
Example of analysis - claim
NoRoom
(paper Example 8)
Client Agency Bank Hotel
Request
Debit Justify
Agency wants to verify if the claim is valid without using Bank’s log 3 scenarios:
RequestSend,RequestRec,DebitSend,JustifyRec
RequestSend,RequestRec,JustifyRec,DebitSend
Incremental analysis
Inconclusive results may demand more logs to be analyzed
Previous results may help in the computation of the new analysis
scen0,ok0 ←Analysis(logs∪logs0,prop)
Incremental calculus
1 Computescen,ok ←Analysis(logs,prop) 2 iscen,iok ←IncrAnalysis(logs0,prop,scen,ok)
iscen:=extract[merge[logs0∪scen]] iok :=extract[merge[logs0∪ok]]
ADVANTAGE: No need to verify the property again
ok0⊆iok ⊆ok scen0⊆iscen⊆scen
Incremental analysis
Inconclusive results may demand more logs to be analyzed
Previous results may help in the computation of the new analysis
scen0,ok0 ←Analysis(logs∪logs0,prop)
Incremental calculus
1 Computescen,ok ←Analysis(logs,prop) 2 iscen,iok ←IncrAnalysis(logs0,prop,scen,ok)
iscen:=extract[merge[logs0∪scen]] iok :=extract[merge[logs0∪ok]]
ADVANTAGE: No need to verify the property again
ok0⊆iok ⊆ok scen0⊆iscen⊆scen
Incremental analysis
Inconclusive results may demand more logs to be analyzed
Previous results may help in the computation of the new analysis
scen0,ok0 ←Analysis(logs∪logs0,prop)
Incremental calculus
1 Computescen,ok ←Analysis(logs,prop)
2 iscen,iok ←IncrAnalysis(logs0,prop,scen,ok) iscen:=extract[merge[logs0∪scen]]
iok :=extract[merge[logs0∪ok]]
ADVANTAGE: No need to verify the property again
ok0⊆iok ⊆ok scen0⊆iscen⊆scen
Incremental analysis
Inconclusive results may demand more logs to be analyzed
Previous results may help in the computation of the new analysis
scen0,ok0 ←Analysis(logs∪logs0,prop)
Incremental calculus
1 Computescen,ok ←Analysis(logs,prop) 2 iscen,iok ←IncrAnalysis(logs0,prop,scen,ok)
iscen:=extract[merge[logs0∪scen]] iok :=extract[merge[logs0∪ok]]
ADVANTAGE: No need to verify the property again
Example of incremental Analysis (paper Example 9)
(claim LateCancel) Client complain that was charged for a reservation that had been canceled
propLateCancel:
DebitSend ∈events(log)∧ CancelSend∈events(log)∧ pos(CancelSend,log)<pos(DebitSend,log) agents(propLateCancel) ={Client,Agency}
Client Agency Bank Hotel
Request Book Confirm Debit Justify Cancel CancelDebit
First analysis
Client Agency Bank Hotel
Request Book Confirm Debit Justify Cancel CancelDebit
Second analysis (incremental)
Client Agency Bank Hotel
Request Book Confirm Debit Justify Cancel CancelDebit
scen with 3 scenarios
Outline
Introduction Logs & Claims Log Functions Log Analyzer
Conclusion
Contributions:
General framework to precisely decribe claims in terms of logs Specification of a Log Analyzer tool
Study of incremental aspects over the acceptability of claims Future works:
Parametrized claims and properties Integration with previous works
Analysis of log architecture [SEFM 2010]
Help adding logs for incremental analysis Formal definition of liability
When should a claim be accepted Claim with multiples responsible agents